title: Git checkout: updating paths is incompatible with switching branches
body: <p>My problem is related to <a href="https://stackoverflow.com/questions/180064">Fatal Git error when switching branch</a>.</p>
  
  <p>I try to fetch a remote branch with the command</p>
  
  <pre><code>git checkout -b local-name origin/remote-name
  </code></pre>
  
  <p>but I get this error message:</p>
  
  <blockquote>
    <p>fatal: git checkout: updating paths is incompatible with switching branches.<br>
    Did you intend to checkout 'origin/remote-name' which can not be resolved as commit?</p>
  </blockquote>
  
  <p>If I manually create a branch and then pull the remote branch, it works, just as making a new clone and checking the branch out.</p>
  
  <p>Why does it not work on the repository I work with?</p>