我做到了:

git fetch --all
Fetching origin
remote: Counting objects: 242, done.
............
From bitbucket.org:xxx/xxx
   xxxx..xxxx  develop    -> origin/develop
 * [new branch]      branch1 -> origin/branch1
   xxxx..xxxx  master     -> origin/master

然后我做了:
git checkout branch1
error: pathspec 'branch1' did not match any file(s) known to git.

但我应该去布兰奇一家。这是怎么回事?

最佳答案

没有名为branch1的本地分支。你得说

git checkout -b branch1 origin/branch1

这将创建一个名为branch1的本地分支,跟踪远程分支branch1

关于git - 无法从远程 checkout 新分支,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24220343/

10-13 07:21