git rebase
DestructiveRebase
git rebase <branch>
Replays commits onto another base; -i to tidy history. Careful after sharing.
Examples
git rebase -i HEAD~3Interactively tidy last 3
Syntax
git rebase <branch> | git rebase -i <ref>
Before you run it
Rebasing shared history can be destructive.
Check it once more before you run it
Some commands cannot be undone if one flag is wrong. An on-device reference works with no connection. Free to install, no ads.
Get it free on the App Store