Restoring deleted files from Git
Cheat-Sheet for restoring deleted files from Git repo #Get a list of deleted files git log --diff-filter=D --summary | grep delete #Show commits where the deleted file was involved, copy latest commit hash to clipboard git log --all -- <PATH_TO_DELETED_FILE> #Restore it into the working copy with: (^ means the commit BEFORE the commit where file was deleted) git checkout <COMMIT-HASH>^ -- <PATH_TO_DELETED_FILE>