Git Internals Objects


Example

git is fundamentally a key-value store. When you add data to git, it builds an object and uses the SHA-1 hash of the object's contents as a key.

Therefore, any content in git can be looked up by it's hash:

git cat-file -p 4bb6f98

There are 4 types of Object:

  • blob
  • tree
  • commit
  • tag