link
git/rebase

Rebase Branch

Reapply commits on top of another base tip

git
rebase
branch

Command

git rebase

Examples

Rebase current branch onto main

git rebase main

Interactive rebase last 3 commits

git rebase -i HEAD~3