We use Git for out repo. I've no idea how but my team's latest history ended up like this:
1-2-3-4-5-6-7 branch1 & branch2
0 - - - (*) - - (*) master
branch2 are pointing at 7, the safer option is to create another branch
n_branch1 and do the following:
git checkout <sha_4> # you'll now be in a detached head git checkout -b n_branch1 # Now go to master and merge n_branch1 git checkout master git merge n_branch1 # Once branch1 commits are merged, apply branch2 on top of them. git checkout branch2 git rebase master
Note: You could also reuse
branch1 by reverting it to 4 (see here).