git diff-tree --no-commit-id --name-status -r <commit-ish>
From StackOverflow's How to list all the files in a commit? :
$ git diff-tree --no-commit-id --name-only -r bd61ad98
index.html
javascript/application.js
javascript/ie6.js
$ git show --pretty="" --name-only bd61ad98
index.html
javascript/application.js
javascript/ie6.js
If you want to get list of changed files:
git diff-tree --no-commit-id --name-only -r <commit-ish>
If you want to get list of all files in a commit, you can use
git ls-tree --name-only -r <commit-ish>
If you want to get a list of all new files in a commit, you can use:
git diff-tree -r --name-only --no-commit-id --diff-filter=A <commit-ish>