Restore a deleted file in Git

# Find in which commit it's been deleted
$ git rev-list -n 1 HEAD -- 
4058ef780d2f6c4c6d57cfd7fd4ebe14c9dc28b3
# Restore it back
$ git checkout 4058ef780d2f6c4c6d57cfd7fd4ebe14c9dc28b3^ -- 


Ali

Get our stories delivered

From us to your inbox weekly.