by jeremy_k · 1y ago · 0 comments
Example: main -> Branch A -> Lots of commits on A -> Branch B -> Lots of commits on B
Now we squash and merge A into main. B now has all of A's commit history, plus some of its own, instead of just it's own. Rebasing main in causes a lot of conflicts.
It takes some git gymnastics to transplant the merge back onto main cleanly.
This is basically exactly the same as checking out a fresh branch from main and cherry picking the commits from branch B.