Commands.app

git rebase

Branching

Reapply commits on top of another base tip

Options & Flags
Available options for this command
-i

Interactive rebase

Examples
Common usage examples

Rebase current branch onto main

git rebase main

Interactive rebase last 3 commits

git rebase -i HEAD~3
Notes
  • Don't rebase commits that have been pushed to public repos
  • Use with caution
Related Commands
You might also find these useful