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.
More on Git internals: objects, refs and the index
What are the four object types in Git's object database?BeginnerWhat is the SHA-1 (or SHA-256) hash of an object and how is it computed?BeginnerWhere does Git store objects on disk, and what are loose objects versus packfiles?IntermediateWhat exactly is a branch, and what does creating one cost?IntermediateWhat is HEAD?BeginnerWhat is a detached HEAD and how do you recover work done in it?Intermediate