Git · Rewriting and tagging
git rebase
Replays commits on a new base. Do not rewrite shared history without coordination.
Syntax
git rebase origin/mainExample
Example
git switch feature/auth git fetch origin git rebase origin/main
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.