Paolo Redaelli personal blog

Find and restore a deleted file in a Git repository

  1. Use git log --diff-filter=D --summary to get all the commits which have deleted files and the files deleted;
  2. Use git checkout $commit~1 filename to restore the deleted file.

Sorgente: Find and restore a deleted file in a Git repository – Stack Overflow

1 comment for “Find and restore a deleted file in a Git repository

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.