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
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow