我对这个问题的理解。
问:
它创建了3个分支,但它们都共享相同的提交历史记录
意味着每次从创建的新分支分支分支中分支。所以最后一定是这样。
master - - - -
\
branchone -
\
branchtwo -
\
branchthree -
如果只有一个在分支上工作,那么可以使用master在分支上执行一个rebase。
以下是再平衡的过程:
弗斯特
branchtwo
git rebase --onto master branchtwo branchone
意味着分支2将从分支1重新定位到主节点上
做同样的事
branchthree
git rebase --onto master branchthree branchtwo
这将变为以下表示:
/ * - branchtwo
master - - - * - branchone
\ * - branchthree