max630 / git-rehi

git-rehi, history editor
https://github.com/max630/git-rehi/wiki
GNU General Public License v2.0
3 stars 0 forks source link

rebase on top of several branches #22

Open max630 opened 10 years ago

max630 commented 10 years ago

consider the history:

-- A -- B -- F -- G -- H
           /
-- C --- D 

Now I want to place G after B, and H after D. I can run renase2 twice, or I can find a common ancestor of A and C and rebase all the way from there (which could ). Or resort to manually constructed todo. But the best way would be to use exactly one command, picking both A and C (or rather B and D) as bases.

max630 commented 10 years ago

The : ... and reset commands are already implemented, algorithm used in find_sequence() I think should be easy to extend to this case. The UI could be like this:

git rebase2 [-i] base1,base2 [rest of the arguments]

This steals ability to use comma in branch names, but I'm afraid it's doomed anyway already.