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


i check author's e-mail , name, surname verify who's pushing repo.

is there way can come command in git show commiter's name/e-mail given sha1 of commit?

this came it's far ideal solution (the first solution git hook that's why it's using 2 sha1s rev-list. second 1 uses git show):

git rev-list -n 1 --pretty=short  ccd3970..6ddf170 | grep author | cut -d ' ' -f2- | rev | cut -d ' ' -f2- | rev git show 6ddf170 | grep author | cut -d ' ' -f2- | rev | cut -d ' ' -f2- | rev  

you can use following command:

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

it suppose work git show well, reason doesn't me when tried it.

git show --format='%ae' hash 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -