I am trying to connect two independent commit trees into one repository.
Initially I have:
A--B--C--D (master1)
E--F--G--H (master2)
\
I--J (somebranch)
These tree have no common ancestor and are independent of each other (different files and directories). I want to rebase both master2 and somebranch (may be multiple branches in fact) onto master1.
It's easy to rebase just single branch with:
#simple reabse:
git checkout master2
git git rebase master1
which would give me:
A--B--C--D (master1)
\
E'--F'--G'--H' (master2)
E--F--G--H
\
I--J (somebranch)
Preferably I would like a single command to move both (or more) branches simultanously, to get result like this:
A--B--C--D (master1)
\
E'--F'--G'--H' (master2)
\
I--J (somebranch)