git ls-tree

List the contents of a tree object. More information: https://git-scm.com/docs/git-ls-tree.

git ls-tree branch_name

git ls-tree -r commit_hash

git ls-tree --name-only commit_hash

git ls-tree -r --name-only HEAD | tree --fromfile