如果我有一组具有共同祖先提交记录
a
的分支,是否有一种简单的方法将它们全部变基到提交记录 b
(其中 a
和 b
的共同祖先可能是第三个提交记录 c
)?是的,只需对它们进行变基。
如果您预期会出现重复冲突,请启用git-rerere,它记录您的冲突解决方案,并且能够在另一个(重新)合并中遇到完全相同的冲突时自动应用相同的解决方案。
或者您可以这样做,
Isolate commit a
in a branch
git checkout -b temporary <commita>
Rebase the temporary
branch onto commit b
.
Rebase all the 'related' branches onto the resulting branch temporary
a
以来的提交进行变基,还是自从c
以来的提交进行变基? - Lily Ballard