List all the files that ever existed in a Git repository

This is a simplified variation of Strager’s solution:

git log --pretty=format: --name-status | cut -f2- | sort -u

Edit: Thanks to Jakub for teaching me a bit more in the comments, this version has a shorter pipeline and gives git more opportunity to get things right.

git log --pretty=format: --name-only --diff-filter=A | sort -u

Leave a Comment