git rebase
BranchingReapply commits on top of another base tip
Options & Flags
Available options for this command
-iInteractive rebase
Examples
Common usage examples
Rebase current branch onto main
git rebase mainInteractive rebase last 3 commits
git rebase -i HEAD~3Notes
- Don't rebase commits that have been pushed to public repos
- Use with caution
Related Commands
You might also find these useful