Git is fundamentally a content-addressable key-value store with a VCS interface layered on top.

The Four Git Objects

  • Blob: Contains file data without metadata or filename.
  • Tree: Represents a directory, linking filenames to blobs or child trees.
  • Commit: Points to a top-level tree, author, timestamp, and parent commit(s).
  • Annotated Tag: A permanent pointer to a specific commit with a message.

Understanding this mental model demystifies commands like git rebase and git cherry-pick.