A Git tree object maps directory entries to other objects. File entries reference blobs, while directory entries reference additional trees, forming a hierarchy rooted at a commit.
Trees are immutable and content-addressed. A change to one file produces new objects along the affected path while unchanged subtrees can be reused.
ELI5
A Git tree object represents one directory by listing names, file modes and identifiers for blobs or nested trees. These links build the folder hierarchy stored by a commit.
For example, changing one file creates a new blob and new tree objects along that file's path, while unchanged folders can reuse their earlier trees. The tree is identified by its contents and does not change in place.
What information does a Git tree store?
It stores entry names, file modes, object types and object IDs for blobs, nested trees or submodule commits.
How is a Git tree different from a directory on disk?
A tree is an immutable repository object describing a snapshot, while a working directory is a mutable filesystem view.

