How to get (only) author name or email in git given SHA1?
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
git show <commit_id> | grep Author
Using git show + pipe + grep works!