Command
git rebaseExplanation
git rebase is used to reapply commits on top of another base tip. It reapplies the commits on top of another base tip.
Examples
Rebase current branch onto main
git rebase mainInteractive rebase last 3 commits
git rebase -i HEAD~3