tairqammar
tairqammar

Reputation: 161

How to see the original author of a commit?

How can I see the original account email of a commit, if the same account use different profiles? For example my email account is [email protected] and I make some commits as [email protected] and [email protected] by changing the user.email config property, how can I find the first email? The original author?

Thank you!

Upvotes: 0

Views: 4019

Answers (3)

Jhonny Ramirez Zeballos
Jhonny Ramirez Zeballos

Reputation: 3156

git log -1 382f36447d634425851171358b927ce305e1e9ad --pretty=format:'%an <%aE>'
Antonio Banderas <[email protected]>

Upvotes: 0

VonC
VonC

Reputation: 1324337

Changing the user.email after creating a commit won't change the author email of past commits.

git log or git show can, through a --format: option show you only the author name and email:

git show --format="%aN <%aE>" COMMIT_ID

Upvotes: 3

tehp
tehp

Reputation: 6394

git show will show the authors email.

eg. git show e8db01ccb4222c18b1b39p8d1252bd41ae439552 or git show e8db01c

Upvotes: 2

Related Questions