git: list all files in a commit

To list all the files tracked a commit, run this:

git ls-tree --full-tree -r <hash>

If you’re only interested in the names:

git ls-tree --full-tree -r --name-only <hash>

Leave a Reply

Your email address will not be published. Required fields are marked *