- 1
Start rebase
git rebase -i HEAD~<n> - 2
Edit picks
# reorder/squash/fixup commits - 3
Continue
git rebase --continue - 4
Push update
git push --force-with-lease
Common mistakes
- Rebasing shared/public commits unexpectedly.
Related commands: git rebase --abort, git push --force-with-lease