Starting on the feature branch: git checkout main git pull git checkout - git pull --rebase origin main git push -f If you have conflicts, you can fix them during the rebase.