How to get (only) author name or email in git given SHA1?

后端 未结 2 1590
走了就别回头了
走了就别回头了 2020-12-09 15:01

I would like to check for author\'s e-mail and name, surname to verify who\'s pushing to my repo.

Is there any way that I can come up with a command in git to show c

2条回答
  •  再見小時候
    2020-12-09 15:42

    You can use the following command:

     git log --format='%ae' HASH^!
    

    It works with git show as well. You need to include -s to suppress the diff.

    git show -s --format='%ae' HASH
    

提交回复
热议问题