July 2018
Intermediate to advanced
354 pages
10h 57m
English
To see the tree object, we can run the same command on the tree, but with the tree ID (34fa038544bcd9aed660c08320214bafff94150b) as the target:
$ git cat-file -p 34fa038544bcd9aed660c08320214bafff94150b 100644 blob f21dc2804e888fee6014d7e5b1ceee533b222c15 README.md 040000 tree abc267d04fb803760b75be7e665d3d69eeed32f8 a_sub_directory 100644 blob b50f80ac4d0a36780f9c0636f43472962154a11a another-file.txt 100644 blob 92f046f17079aa82c924a9acf28d623fcb6ca727 cat-me.txt 100644 blob bb2fe940924c65b4a1cefcbdbe88c74d39eb23cd hello_world.c
We can also specify that we want the tree object from the commit pointed to by HEAD by specifying git cat-file -p HEAD^{tree}, which would give the same results as the previous command. The special ...
Read now
Unlock full access