Learn Git by doing
Build a repository, one commit at a time.
Everything else explains rebase in prose, or shows it in a video while you watch. This hands you the repo: your files, the staging area, and the commit graph, side by side, changing as you type.
The command is already typed. Press enter and watch which commits move, and which ones do not.
- 8chapters
- 33levels
- ~90minutes
- 0things to install
Three places, one change
Almost every Git command moves work between these three places. Once you can picture them, the commands stop being magic, and the workspace shows all three at once.
What you’ll be able to do
Not “understand”. Do it, on a keyboard, without looking it up.
git rebaseRebase on purposeNot by pasting a command off a wiki and hoping it works out.--ontoTransplant a branchMove the two commits you meant and leave the rest exactly where they are.--continueResolve a conflictRead the markers, blend both sides, and know what --abort costs you.--force-with-leasePush without fearUnderstand why a push is rejected, and which force flag has a guard rail.git resetRead all three resetssoft, mixed, hard, and which of the three trees each one touches.git reflogUndo the unrecoverableBring back a branch you were sure a hard reset had destroyed.8 chapters
Chapter 4 gets the most minutes because rebase is the reason this exists; chapter 8 adds no new commands at all, because retrieval practice is what actually moves knowledge into long-term memory.
- 01CommitsFiles, staging, commits, and reading history.3 levels
- 02BranchesA branch is a pointer. Everything else follows from that.4 levels
- 03MergeFast-forward, real merges, and what a second parent means.4 levels
- 04RebaseReplaying commits onto a new base, and transplanting a branch.5 levels
- 05ConflictsMarkers, --continue, --abort, ours versus theirs.4 levels
- 06RemotesFetch, pull, push, and why a push gets rejected.5 levels
- 07Undoreset, revert, reflog, and which of them rewrite history.5 levels
- 08Boss levelNo new commands. Real scenarios, start to finish.3 levels
The sandbox is already open.
That’s the entire idea.
The one thing that reliably teaches Git is seeing the graph change under your own commands. That normally needs a repo you are not afraid to break, which needs setup, which is where most people quit. So there is no setup, and nothing here can touch a real repository.