How can two branches be combined into a single branch based on the date of each commit?

你。 提交于 2019-12-04 10:05:05
splicer

Here's a solution that does what I want, based on adymitruk's original answer:

git checkout -b branchAB merge-base
git merge branchA
git merge branchB
git rebase --onto merge-base merge-base branchAB

This should do it:

git branch branchAB branchA
git checkout branchB
git merge branchA
git rebase --onto A1^ B1^ branchAB

The rebase will "eat" the merge commit as --preserve-merges was not specified.

hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!