Rebase
Chester Wyke June 28, 2023 Updated: April 26, 2025 #GitRebase onto develop
git rebase develop
If you’d already pushed the branch before you’ll need to do a force push
git push -fRebase interactive
Source: https://git-scm.com/docs/git-rebase
Unpushed
Observation: Only seems to rebase unpushed commits.
git rebase -iIncluding Pushed
git rebase -i --onto developRebase your branch after someone else force pushes to it
These erase what you have locally with the info from remote
This works for me (but saw it didn’t work for others)
git pull -fThis one worked when the one above didn’t work
Source: Trippy Maintainers Chat (Included a link to guidance)
git fetch
git reset origin/my-branch --hard