Skip to main content
deleted 1 character in body
Source Link
Philippe
  • 30.4k
  • 6
  • 61
  • 86

I think that the best way to understand the content of each type of git objects is to explore them yourself.

You could do it easily using the command :

git cat-file -p <a_sha1>

Start with the sha1 of a commit. You will get sha1s of trees, take one and apply always the same command to go all the way down to finish towith a blob.

You will see everything timeevery times the content that is stored in the git object in the database.

The only other thing that you should know is the that the content is prefixed by the type of object, the length of the content and then compressed.

I think that the best way to understand the content of each type of git objects is to explore them yourself.

You could do it easily using the command :

git cat-file -p <a_sha1>

Start with the sha1 of a commit. You will get sha1s of trees, take one and apply always the same command to go all the way to finish to a blob.

You will see everything time the content that is stored in the git object in the database.

The only other thing that you should know is the that the content is prefixed by the type of object, the length of the content and then compressed.

I think that the best way to understand the content of each type of git objects is to explore them yourself.

You could do it easily using the command :

git cat-file -p <a_sha1>

Start with the sha1 of a commit. You will get sha1s of trees, take one and apply always the same command to go all the way down to finish with a blob.

You will see every times the content that is stored in the git object in the database.

The only other thing that you should know is that the content is prefixed by the type of object, the length of the content and then compressed.

Source Link
Philippe
  • 30.4k
  • 6
  • 61
  • 86

I think that the best way to understand the content of each type of git objects is to explore them yourself.

You could do it easily using the command :

git cat-file -p <a_sha1>

Start with the sha1 of a commit. You will get sha1s of trees, take one and apply always the same command to go all the way to finish to a blob.

You will see everything time the content that is stored in the git object in the database.

The only other thing that you should know is the that the content is prefixed by the type of object, the length of the content and then compressed.