Interview Prep/Git & GitHub/Git internals: objects, refs and the index

Is Git a snapshot system or a diff system?

BeginnerConceptGit internals: objects, refs and the index
Answer

Conceptually Git stores snapshots: every commit points to a complete tree describing the whole project at that moment. Diffs are computed on demand by comparing two trees. Packfiles do use delta compression for storage efficiency, but that is an on-disk optimisation and invisible to the data model.

All Git & GitHub questions Roadmap: Git & GitHub

More on Git internals: objects, refs and the index