问题
How can I see the original account email of a commit, if the same account use different profiles? For example my email account is email1@email.com and I make some commits as email2@email.com and email3@email.com by changing the user.email config property, how can I find the first email? The original author?
Thank you!
回答1:
git show will show the authors email.
eg. git show e8db01ccb4222c18b1b39p8d1252bd41ae439552 or git show e8db01c
回答2:
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
来源:https://stackoverflow.com/questions/50826799/how-to-see-the-original-author-of-a-commit