Back
I know git stores information of when files get deleted and I am able to check individual commits to see which files have been removed but is there a command that would generate a list of every deleted file across a repository's lifespan?
For listing all deleted files you could use:
git log --diff-filter=D --summary
And for info, you can see this answer: https://intellipaat.com/community/3107/find-and-restore-a-deleted-file-in-a-git-repository?show=3107#q3107
If you don’t need more details on which commit they were removed you could simply use:
git log --diff-filter=D --summary | grep delete
Warning: This lists all files which you've deleted. If you've deleted a file, then created a new file with the same name, it will show up on this list, even though there's a file with that name.
31k questions
32.8k answers
501 comments
693 users