Updated: 24 February 2026
Rebase a branch without first checking it out
git rebase this-branch on-this-branch
Rebase onto
git rebase --onto newbase from-commit-after branch-to-move
If required to squash into the first commit of a repository
git rebase --interactive --root