title: How to alias a tag in Git?
body: <p>I have a Git command alias to checkout the latest tag from a repository:</p>
  
  <p><code>~/.gitconfig</code>:</p>
  
  <pre><code>checkout-latest = !git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
  </code></pre>
  
  <p>So I can use it in properly tagged repositories like this:</p>
  
  <pre><code>$ git checkout-latest
  </code></pre>
  
  <p>I have command aliases for the checkout command:</p>
  
  <p><code>~/.gitconfig</code>:</p>
  
  <pre><code>co = checkout
  </code></pre>
  
  <p>The <code>checkout-latest</code> does not work with the command aliases for checkout:</p>
  
  <pre><code>$ git co-latest
  git: 'co-latest' is not a git command. See 'git --help'.
  </code></pre>
  
  <p>How can I configure Git so that I can use latest as a tag alias that points to the programmatically determined latest tag? I would like to use it like this:</p>
  
  <pre><code>$ git checkout latest
  </code></pre>
  
  <p>and</p>
  
  <pre><code>$ git co latest
  </code></pre>
  
  <p>Note that there is <strong>no dash between the subcommand and the tag</strong> in my desired variants.</p>