假设我有以下 git
结构
1--2--3--11--12 (master-branch)
\
4--5--6--7--8--9--10--13--14 (custom-branch)
如何进入以下 git
结构?
1--2--3--4--11--12 (master-branch)
\
5--6--7--8--9--10--13--14 (custom-branch)
最佳答案
只需将 custom-branch
上的 master
重新设置为 4
提交即可:
git checkout master
git rebase custom-branch~8
通过检查,您在这里要做的就是使 1--2--3--4
成为两个分支的新公共(public)基础。
关于git - 如何 merge 或插入某些提交到其他分支?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48557161/