blobs are blobs, trees refer to blobs and trees and commits by embedding the hash codes of the contained blobs and trees and commits so the tree's hash is a hash-of-hashes, and a commit embeds its (toplevel) tree's hash along with any parent commit hashes etc.
Fetch zlib and build its zpipe example, that will let you dump the content of each repo object directly (or git cat-file
will do the same but without the type/length/nul header)