Git Essentials(Second Edition)
上QQ阅读APP看书,第一时间看更新

Trees

The tree is a container for blobs and other trees. The easiest way to understand how it works is to think about folders in your operating system, which also collect files and other subfolders inside them.

Let's try to see what this additional Git object holds, using again the git cat-file -p command:

[16] ~/grocery (master)
$ git cat-file -p a31c3
100644 blob 907b75b54b7c70713a79cc6b7b172fb131d3027d README.md
100644 blob 637a09b86af61897fb72f26bfb874f2ae726db82 shoppingList.txt

This tree, which we said is something that Git uses to identify a folder, also contains some additional objects, called blobs.