git: How to list all files that ever existed in the current branch?
This is useful for cleaning up sensitive data even if you don’t know the specific filename:
git log --pretty=format: --name-only --diff-filter=A | sort -u
Original source: Dustin on StackOverflow