title: Git aliases - command line autocompletion of branch names
body: <p>If I run a regular git command such as <code>git checkout</code> I get helpful autocompletion of branch names when hitting the tab key.</p>
  
  <p>I have a few git aliases which take branch names as parameters, and I'm wondering if there's a way of getting the branch name autocompletion to work with them?</p>
  
  <p><em><strong>Edit:</em></strong></p>
  
  <p>Just to provide some clarification from the discussion in the comments, aliases with a direct mapping work fine, i.e.:</p>
  
  <pre><code>ci = commit
  co = checkout
  </code></pre>
  
  <p>It's ones that are a bit more involved and use <code>$1</code> as a parameter that don't, for example:</p>
  
  <pre><code>tagarchive = !f() { git tag archive/$1 origin/$1 &amp;&amp; git push origin :$1 &amp;&amp; git push origin archive/$1 &amp;&amp; git branch -d $1; }; f
  </code></pre>