Rebasing After a Squash-Merge: Using git rebase --onto to Skip Already-Merged Commits
You branched off a feature branch. The PR got squash-merged into main. Now git rebase main hits conflicts on every commit, all on changes that are already in main. Here's why it happens, and how to fix it with one command.