Git · Rewriting and tagging

git rebase

Replays commits on a new base. Do not rewrite shared history without coordination.

Syntax
git rebase origin/main

Example

Example
git switch feature/auth
git fetch origin
git rebase origin/main

More in this group

git describe git rebase --abort git tag Interactive rebase

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.

Open the course