Git Tree Object

The format of tree object looks like the following (after Zlib decompression):

  tree <size>\0
  <mode> <name>\0<20_byte_sha>
  <mode> <name>\0<20_byte_sha>

(note the actual file doesn’t contain new line. The above snippet only contains newline for readability purpose.)