Inside .git/objects Git stores four kinds of objects, each addressed by the SHA-1 hash of its content:
- Blob — the raw bytes of a single file. No filename, no metadata. Identical files share a blob.
- Tree — a directory listing: filename → mode → blob/tree hash. Trees can contain other trees.
- Commit — a snapshot: tree hash + parent hashes + author + committer + message. Pointing at a tree freezes the entire directory state.
- Tag — an annotated reference to another object, usually a commit, with its own message.
Why this matters: because content is hashed, Git can deduplicate identical files across history. Because commits point to a whole tree, not deltas, every commit is a full self-contained snapshot. Branches are just movable pointers to commits.
You can poke at any object: git cat-file -p <hash>.