title: Git Checkout Latest Tag
body: <p>I'm writing a shell script and I'm looking to checkout the latest version of repo. Specifically I want to break this process apart into multiple steps.</p>
  
  <ol>
  <li>I want to save the repositories latest tag into a variable </li>
  <li>Print out <code>Checking out version: XX</code></li>
  <li>Checkout the latest tag</li>
  </ol>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/7123592/determine-latest-received-git-tag">similar questions</a> but I don't see how to save the name of the tag into a variable (probably because I'm a noob with shell scripts).</p>