Apr 14 2010

fatal: git checkout: updating paths is incompatible with switching branches.

Published by at 11:16 am under GIT

Using GIT I tried to pull down a new remote branch using:

git checkout --track -b my-branch-name origin/my-branch-name

When I did this I got this error message:

fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'origin/my-branch-name' which can not be resolved as commit?

This error message was a tad confusing. The solution in my case was simple though, apparently you can’t switch to a different remote branch if your local master is not up-to-date with the remote origin/master so performing:

git pull

resolved the issue and after this I was able to successfully pull down the remote branch.

3 responses so far

3 Responses to “fatal: git checkout: updating paths is incompatible with switching branches.”

  1. Dan says:

    Great! Thanks! The error message was definitely confusing, but pulling first worked for me too. Thank you.

  2. Mike Branski says:

    Cheers for this! Such a simple solution, but just what I needed.

  3. Oh man thanks so much, i’ve been looking for a solution to this for a whole freaking day without success.

    you saved me lot of time

Leave a Reply