title: How to get (only) author name or email in git given SHA1?
body: <p>I would like to check for author's e-mail and name, surname to verify who's pushing to my repo.</p>
  
  <p>Is there any way that I can come up with a command in git to show commiter's name/e-mail given only SHA1 of the commit?</p>
  
  <p>This is what I came up with but it's far from ideal solution (the first solution is for git hook that's why it's using 2 SHA1s with <code>rev-list</code>. The second one simply uses <code>git show</code>):</p>
  
  <pre><code>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 
  </code></pre>