What is a Git blob object?

Definition

A Git blob contains raw file data. File names, modes and placement are stored by tree objects that point to the blob's object ID.

Because blobs are content-addressed, identical file content can be reused across directories, branches and commits. Metadata such as renames is inferred from repository history rather than stored in the blob.

Acronyms and aliases

blob object variant

Frequently asked questions

Does a Git blob store a file name?

No. The blob stores content, while a tree object associates that content with a name and file mode.

Can one Git blob be used by several commits?

Yes. Any tree can reference the same blob object when the underlying file content is identical.

Videos explaining Git blob object