Git Made Crystal Clear · chapter 2: What Git Is, and Why It Won

Snapshots vs diffs

2026-08-27

Every time you commit, Git records a full tree, a snapshot of what every file looked like at that moment. If a file did not change since the last commit, Git does not store it again; the new snapshot simply points to the identical previous copy. So snapshots are cheap, and reconstructing any past version is just reading one tree rather than replaying a chain of diffs.

Figure 2.1: Snapshots vs diffs. Other systems store the change per version and replay the chain to rebuild a file; Git stores a full snapshot per commit and lets unchanged files reference the identical previous copy.
Figure 2.1: Snapshots vs diffs. Other systems store the change per version and replay the chain to rebuild a file; Git stores a full snapshot per commit and lets unchanged files reference the identical previous copy.

This diagram is one of many in Git Made Crystal Clear.

Every chapter opens with the gist, draws the hard ideas, and ends with recipes and sources.

Get the book

All diagrams