Algocraft / Git Commands / Roadmap

Git Commands

The Git Roadmap.

10 commands across 4 phases, in the order that builds on itself — start a repo and learn the three trees first, then branching and merging, then the commands that rewrite history, and finally the ones you need to collaborate. Progress is saved in this browser.

0 / 10 complete
Phase 1Getting Started
init & clone
Starting a Repository

The unborn branch, and what clone sets up automatically.

add, commit & status
The Three Trees

Working Directory → Staging Area → Repository.

Phase 2Branching Model
branch & checkout
Movable Pointers

Create branches, move HEAD, and detached HEAD.

merge
Combining Histories

Fast-forward vs three-way merge commits.

Phase 3Rewriting History — the commands that trip people up
rebase
Linear History

Replaying commits onto a new base, new hashes.

cherry-pick
One Commit at a Time

Copy a single commit onto your current branch.

reset vs revert
Undoing Commits

soft/mixed/hard reset, compared with a safe revert.

Phase 4Collaboration
stash
Shelving Work

Shelve uncommitted changes, switch branches, pop back.

fetch, pull & push
Talking to Origin

Remote tracking refs, and why pushes get rejected.

tag
Marking Releases

Lightweight vs annotated tags, checking one out.