Skip to content

Git internals, explained Explained

How Git really works: the three trees behind every commit, a branch as a movable pointer, and what rebase does that merge does not, each shown as a live animated diagram.

Animated diagrams · 3 flows

Compare all 3

Sort by any column to find the right fit. Click a name to open its details.

Branch = PointerPointer advances along the chainOn every commitInstant, updates one small file.git/refsLowCheap experiments and fast context switches
Rebase vs MergeRebase: replay onto base · Merge: join two linesOn demandBoth fast; rebase rewrites hashesCommit graph (DAG)MediumClean linear history vs preserved true history
The Three TreesWorking dir → index → HEADNo, moves only on git add / commitInstant, all local.git object storeLowUnderstanding staging, resets and checkouts