<分区>
什么是 git checkout -b <branchname>
对于?
我的意思是,您可以通过执行 git branch <branchname>
创建一个分支
但是,它做了什么git checkout -b <branchname>
具体?
标签 git
<分区>
什么是 git checkout -b <branchname>
对于?
我的意思是,您可以通过执行 git branch <branchname>
创建一个分支
但是,它做了什么git checkout -b <branchname>
具体?
最佳答案
这意味着你要做两件事:
<branchname>
<branchname>
它只是创建一个新分支然后直接 check out 它的简写。
$ git checkout -b new-feature
是以下内容的简写并等效于:
$ git branch new-feature
$ git checkout new-feature
有关引用,请参阅 documentation on git-branch .
关于git - 什么是 git checkout -b <branchname> ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32080865/