title: What is nearest tag in the past and how far we from nearst tag to working directory in Git repository
body: <p>Mercurial have command to determine if we at tag release or how far from it:</p>
  
  <pre><code>hg log -r . --template '{latesttagdistance}'
  hg log -r . --template '{latesttag}'
  </code></pre>
  
  <p>Is there a way to get latest tag for working directory and how far we from latest tag for Git?</p>
  
  <p>When I get some GitHub code I usually use tagged version instead of <code>master</code> to avoid inconsistent/transient state. I look to list of <code>git tag -n1 -l</code> by eyes and this is error-prone.</p>