3

If I have a set of branches with common ancestor commit a, is there an easy way to rebase all of them onto commit b (where the common ancestor of a and b might be some third commit c)?

2

1 Answer 1

4

Yes. Just rebase them all.

If you anticipate repeated conflicts, enable git-rerere, which records your conflict resolutions and is able to automatically apply the same resolution when merge encounters the exact same conflicts in another (re)merge.

Or you could,

  1. Isolate commit a in a branch

     git checkout -b temporary <commita> 
  2. Rebase the temporary branch onto commit b.

  3. Rebase all the 'related' branches onto the resulting branch temporary

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.