What is rebase in Git?
Rebasing moves your branch so it starts from the newest main. Your commits are replayed on top, as if you had started today.
- In one line
- Replay your work on latest main.
- Part of
- Git & GitHub: How code is saved, shared and reviewed.
The full Rebase page
- An everyday picture of it, with no tech words
- The same idea in the words you will hear at work
- An animation of how it works, in 5 steps
- A cheat sheet of 5 commands to copy
- 6 phrases you will hear a team use, in plain English
Open Rebase in the appFull basics lessons require a paid plan.
More in Git & GitHub11
How code is saved, shared and reviewed.
RepositoryOne project's code and history.
CommitA saved snapshot of changes.
BranchYour own lane for changes.
PushSend your commits to GitHub.
PullGet teammates' latest changes.
Pull requestAsk to merge your branch.
Code reviewTeammates check your change.
MergeCombine a branch into main.
Merge conflictTwo edits to the same lines.
StashSet changes aside for later.
UndoBack out of a mistake safely.