tree object
The Git object that lists one directory: each entry's name, file mode and the ID of the blob or sub-tree it points at.
In more detail
A commit points at exactly one tree, the root folder of the project, and that tree points at everything below it. Together they are the whole snapshot. Two commits with identical files have the same tree ID even if everything else about them differs.
Example
git cat-file -p 'HEAD^{tree}'Related terms
- Git object — One item in Git's database, a blob, tree, commit or annotated tag, stored under the hash of its content.
- blob — The Git object that holds the contents of one file, with no file name attached.
- commit — A saved snapshot of the whole project in Git, together with its author, committer, time, message and a pointer to the commit before it.
- snapshot — A saved copy of some state at one moment, kept so it can be restored later.
Taught in
- What A Commit Really Is — Advanced Git Internals & Distributed Workflows