How to see the original author of a commit?

会有一股神秘感。 提交于 2021-02-08 10:29:14

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!