how to restore all deleted files in git code example Example: recover lost file git git log --diff-filter=D --summary git checkout $commit path/to/file