What is the Git object model?

Definition

The Git object model represents files and history as immutable objects. Blobs store file content, trees describe directory entries and commits point to a root tree and parent commits.

Each object is identified by a hash derived from its content. This provides integrity and deduplication, but reconstructing a checkout can require many related objects and storage lookups.

Acronyms and aliases

Git data model variant

Frequently asked questions

Which objects are part of the Git object model?

Git uses blob, tree, commit and annotated tag objects, each identified by a content-derived object ID.

Why does Git use content-addressed objects?

Content addressing detects changes, supports integrity checks and allows identical content to be stored and transferred efficiently.

Videos explaining Git object model