Rebasing a Stacked Branch After a Squash Merge

A situation that happens a lot in teams: a teammate opens feature-a, you need their work, so you branch feature-b off it and keep going. A few days later feature-a gets merged into main. Now you want feature-b to sit on top of main. The obvious move doesn’t work You run git rebase main and… conflicts. Lots of them, in code you never touched. The reason: feature-a was squash-merged. Its 5 commits were combined into one brand-new commit S on main....

November 10, 2026 · Stewie