From Pro Git:
you can set up other tracking branches if you wish — ones that don’t track branches on origin and don’t track the master branch. The simple case is the example you just saw, running git checkout -b [branch] [remotename]/[branch]
$ git checkout --track origin/serverfix Branch serverfix set up to track remote branch refs/remotes/origin/serverfix. Switched to a new branch "serverfix"
$ git checkout -b sf origin/serverfix Branch sf set up to track remote branch refs/remotes/origin/serverfix. Switched to a new branch "sf"
My understanding is that this presents a way to create a local branch and an upstream branch.
But when I do:
git checkout -b iss53 origin/iss53
I get:
fatal: Cannot update paths and switch to branch 'iss53' at the same time.
And when I do:
git checkout --track origin/iss53
I get:
fatal: Cannot update paths and switch to branch 'iss53' at the same time. Did you intend to checkout 'origin/iss53' which can not be resolved as commit?
Why?