AI Snips
Chapters
Transcript
Episode notes
Content-Addressable Object Store
- Git stores content-addressable objects under .git/objects using compressed files named by SHA-1 hashes.
- Use git-cat-file to reveal an object's type and contents because files are zlib-compressed with headers.
Why Git Uses Content Hashes
- Git is distributed, so identifiers are content hashes rather than centralized incremental numbers.
- Everyone agrees on object SHAs, enabling offline work and later reconciliation with remotes.
What Staging Actually Does
- Staging writes content into the index and creates a loose object in .git/objects referenced by its SHA.
- The index maps filenames to those SHA-addressed objects before a commit binds them into a tree.


