How to display metadata about single commit in git?
Supply the quiet option to show to suppress the diff.
git show --quiet HEAD
So for your example, author name:
git show --quiet --pretty=format:%an
git --no-pager show -s --format='%an <%ae>' COMMIT
--no-pager
supresses the pager-s
suppresses diff output; short for--no-patch
%an
is the author name%ae
is the author email
(Taken from quora.com)