git rebase main

Category: Git - Core

git rebase main

Rebase current branch on top of main

Moves your current branch's commits to start from the tip of the main branch, as if you branched off from there.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.