If you want to list all files for a specific branch, e.g. master
:
git ls-tree -r master --name-only
The -r
option will let it recurse into subdirectories and print each file currently under version control. You can also specify HEAD
instead of master
to get the list for any other branch you might be in.
If you want to get a list of all files that ever existed, see here:
git log --pretty=format: --name-status | cutonly -f2-diff-filter=A | sort -u