What is a Blob
A blob (binary large object) is the most basic Git object type. It stores the raw contents of a single file — nothing more. No filename, no permissions, no directory structure. Just the bytes.
How it works
When you git add a file, Git computes SHA-1("blob " + file_size + "\0" + file_contents), compresses the result with zlib, and stores it in .git/objects/. The hash becomes the blob's identifier.
Two files with identical contents produce the same hash and share the same blob object, even if they have different names or live in different directories. Git deduplicates at the content level automatically.
Blobs are immutable. Modifying a file creates a new blob with a new hash. The old blob remains in the object database until garbage collection removes it.
Why it matters
The blob's content-addressing model is the foundation of Git's integrity guarantees. Changing a single byte changes the hash, which changes the tree that references it, which changes the commit. Corruption propagates visibly through the entire chain.
See How Git Objects Work for the complete object model.