I sometimes use the checkout -b
option to create a new branch, check it out at the same time and set up tracking in one command.
In a new environment, I get this error:
$ git checkout -b test --track origin/master
fatal: Cannot update paths and switch to branch 'test' at the same time.
Did you intend to checkout 'origin/master' which can not be resolved as commit?
Why does Git not like it? This used to work with the same repo.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…