git rebase
Reapply commits on top of another base
AdvancedSyntax
git rebase <branch>
Examples
git rebase main— rebase maingit rebase --onto main feature— rebase --onto main feature
Common flags & options
- •--onto newbase upstream Rebase onto different base
- •-i Interactive rebase