Learn Gitby actually using it.
- 01 · Read
Each lesson is one idea, explained in a few short paragraphs — no walls of theory.
- 02 · Do
Type into a live environment and watch it react. Tab completes, ↑ recalls,
undotakes back any step. - 03 · Match
Reach the goal any way you like — you're judged on the result, not the keystrokes. Par is the shortest route.
Snapshots
The working directory, the staging area and the commit — what Git actually saves, and when.
- 01 Your first commit The three places a change lives, and how one becomes a commit.
- 02 Stage only what belongs together One commit, one idea — choosing what goes into a snapshot.
- 03 Take it back with restore Unstage a file, or throw away a change entirely.
- 04 History is a chain Every commit points at its parent. That's the whole data structure.
Branching
Branches are cheap pointers. Make them, switch between them, and bring their work back together.
- 05 A branch is just a pointer Create a branch, switch to it, and watch it move as you commit.
- 06 Diverge on purpose Two lines of work from the same starting point.
- 07 Bring work together with merge A merge commit has two parents — and that's how it joins histories.
- 08 When a merge just moves a pointer Fast-forward merges, and cleaning up a merged branch.
Moving around
HEAD, detached HEAD, relative refs and tags — how to point at any commit in history.
Undoing
Reset, revert, the reflog and the stash. Almost nothing in Git is truly lost.
- 13 Rewind with reset Move your branch back in time — locally.
- 14 Uncommit, but keep the work reset --soft: undo the commit, keep everything staged.
- 15 Undo in public with revert Undo a commit without rewriting history anyone else has.
- 16 The reflog remembers Recover from a reset you regret.
- 17 A pocket for unfinished work Stash your changes, fix something urgent, and pick up where you left off.
Rewriting history
Rebase, cherry-pick, amend and interactive rebase — shaping history before you share it.
- 18 Rebase: replay your work Move a branch so it starts from the latest main.
- 19 Rebase, then fast-forward The linear-history workflow, end to end.
- 20 Cherry-pick exactly what you need Copy individual commits from anywhere onto where you are.
- 21 Fix the last commit --amend replaces your latest commit.
- 22 Clean up with interactive rebase Reorder, squash and drop commits before you share them.
Working with others
Clone, fetch, pull and push — and what to do when the server says no.
- 23 Clone: your own full copy Download a repository — all of its history, not just the files.
- 24 origin/main is a bookmark Remote-tracking branches only move when you talk to the server.
- 25 Fetch: see what changed Download new work without touching yours — then merge it.
- 26 Pull = fetch + merge One command to bring in other people's work.
- 27 Push: publish your commits Send your work to the server.
- 28 When push is rejected Someone pushed first. Integrate their work, then push yours.
- 29 Share a feature branch Push a new branch and set its upstream.
Mastery
Transplanting branches, shipping hotfixes, force-pushing safely and recovering deleted work.
- 30 Transplant with --onto Move a branch off one base and onto another.
- 31 Ship a hotfix to two lines One fix, applied to main and to an older release.
- 32 Rewrite a pushed branch safely Rebase a published branch, then force-push without clobbering anyone.
- 33 Recover a deleted branch Branch -D isn't the end. The reflog is.
The simulator models commits, branches, HEAD, the reflog, a remote, and the working tree, staging area and stash. It doesn't model file contents, so there are no merge conflicts here — when you meet one for real, the mental model you build here is what gets you through it.