Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个分支。我想创建一个新的。我怎么知道它将从哪个分支启动它?
谢谢!
如果您只键入git branch,它将从您当前已签出的提交中分支出来。如果您使用git checkout -b创建新分支并立即将其签出,则同样适用。
git branch
git checkout -b
或者,您可以指定起点。以下两个都将创建一个分支“bar”,它从“foo”的当前尖端开始:
git branch bar foo git checkout foo -b bar