git ls-tree
git ls-tree [-r] [--name-only] <tree-ish> [<path>]
Risk: Safe
What it does
Lists the files and folders inside one tree.
When to use it
To see what a commit saved, without checking it out.
Example
$ git ls-tree HEADList the top folder of the newest commit.
$ git ls-tree -r --name-only HEAD~1List every file of an older commit.
Learn it in: Plumbing vs porcelain · Official docs