title: How to git checkout a remote branch named the same as a directory?
body: <p>We have a remote branch named <code>deploy</code> for building and testing deploy scripts. Not surprisingly, the deploy scripts end up in a directory called <code>deploy</code>. Now that the directory <code>deploy</code> is in the branch <code>master</code>, when doing an initial clone it's cumbersome to actually check out that branch.</p>
  
  <pre><code>$ git clone bitbucket.org:/myplace/mything
  $ cd mything
  $ ls
  deploy          extensions      installExtensions   src         tests
  $ git branch -r | grep dep
    origin/deploy
  $ git checkout deploy
  $ git branch
  * master
  $ git checkout origin/deploy
  Note: checking out 'origin/deploy'.
  
  You are in 'detached HEAD' state. [SNIP]
  </code></pre>
  
  <p>At this point should I just create a local branch named <code>deploy</code> and set it to track the remote? Is there any syntax I can give git so it knows I want to checkout a remote branch, not a local path?</p>