How does Git internally store the content of files and directories — what are "blobs", "trees", and "commits"?
Correct! Well done.
Incorrect.
The correct answer is A) A "blob" stores a file's raw compressed content, identified by its hash; a "tree" represents a directory, listing blobs and other trees with names and modes; a "commit" points to a root tree representing project state, plus metadata and parent references
Correct Answer
A "blob" stores a file's raw compressed content, identified by its hash; a "tree" represents a directory, listing blobs and other trees with names and modes; a "commit" points to a root tree representing project state, plus metadata and parent references
This object model (blobs, trees, commits, and tags) forms a content-addressable filesystem — identical file content across different commits is stored only once as the same blob, since the SHA-1 hash is based purely on content.