Suppose I have branch A. Now I create new branch B from A and make some commits. Suppose during this time A got a bunch of commits as well. Is there a way to merge those new commits to B such that the commits I made on B will be that the top ?
To illustrate:
A -> a1 -> a2 -- B created here -- -> a3 -> a4
B -> a1 -> a2 -> b1 -> b2
How do I merge such that B ends up like
B -> a1 -> a2 -> a3 -> a4 -> b1 -> b2
You want to
rebase, notmergeWhen on
B, doThis won’t affect the A branch, but it will rewrite the recent history of the B branch.
Beforehand, you had
and after you will have: