blob
The Git object that holds the contents of one file, with no file name attached.
In more detail
The name of the file is stored in the tree that points at the blob, not in the blob itself. So two files with identical content, whatever their names, share one blob and one ID.
Example
git cat-file -p HEAD:notes.txtRelated terms
- Git object — One item in Git's database, a blob, tree, commit or annotated tag, stored under the hash of its content.
- tree object — The Git object that lists one directory: each entry's name, file mode and the ID of the blob or sub-tree it points at.
- content addressing — Storing and finding data by a hash of its content instead of by a name someone chose.
Taught in
- What A Commit Really Is — Advanced Git Internals & Distributed Workflows
- The Three Areas: Working Tree, Index, Repository — Advanced Git Internals & Distributed Workflows