Last episode we saw three folders. This episode we open one.
Episode 2 — The Object Database. We promised to explain that strange
folder name inside .git/objects/. Now we deliver. We run git hash-object,
see the SHA-1 algorithm at work, open up a blob with git cat-file -p,
and prove that the content really is sitting there on disk, compressed
with zlib. Then we explain why Git splits hashes into a 2-character
folder and a 38-character filename — it's a filesystem optimization
that matters more than you'd think.
What you'll learn:
SHA-1 — how Git names content by its fingerprint
Why identical content always produces identical hashes (deduplication)
Why one character changing produces a completely different hash
What a "blob" actually is, and how to read one with git cat-file
Why Git splits hashes into 2-char folders (the 256-folder trick)
That the empty file has the same hash on every Git repo on Earth
This is Episode 2 of an ongoing series. Episode 3 cracks open trees —
the object type that gives blobs their filenames and directory
structure. Subscribe so you don't miss it.
⏱ Chapters
00:00 The Cliffhanger Resumed
00:54 SHA-1, The Naming Algorithm
02:01 Blobs, The Storage Format
03:36 Why Two Characters?
04:56 What's Next — Trees
🔗 Previous episode:
Episode 1 — The Three States: • Git, Visualized to the Metal — Episode 1: ...
🎬 The Stack Underflow explains what your textbook skipped — Linux
internals, networking, distributed systems, and production realities
most tutorials avoid.
Subscribe: @TheStackUnderflow
#Git #GitInternals #GitTutorial #SHA1 #VersionControl
#SoftwareEngineering #LinuxInternals #DeveloperTools #LearnToCode