有时我会使用该checkout -b
选项创建一个新分支,同时将其检出并在一个命令中设置跟踪。
在新环境中,我收到此错误:
$ 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?
为什么Git不喜欢它?这曾经与相同的仓库一起使用。
origin/master
不是提交ID,即不是有效的远程分支。它会显示在git branch -r
输出中吗?