Git Find Deleted File
If you need to search for a deleted file, you can filter your git log
:
git log --diff-filter=D --summary
You can pass in a directory:
git log --diff-filter=D --summary . #current working directory
Or search by author of the commit which deleted the file:
git log --diff-filter=D --author=goliatone --summary
Now, if you want to restore the deleted file, you can issue the following command:
git checkout <commit>~1 <filename>
You can create an alias:
$ nano ~/.gitconfig
[aliases]
dl = log --diff-filter=D --summary