Git 2 · Branches

Rebase onto another branch

Replay your commits on top of main.

git rebase main

Caution: Rebasing rewrites commits. Don't rebase branches other people have pulled.

Official Git 2 documentation

More branches commands

All branches commands · Git 2 cheatsheet

Was this page helpful?