--- title: Restore a deleted file type: snippet language: git tags: [branch] author: chalarangelo cover: succulent-red-light dateModified: 2021-04-13T21:10:59+03:00 --- Restores a file deleted in a specific commit. - Use `git checkout ^ -- ` to restore the specified `` deleted in the specified ``. ```shell git checkout ^ -- ``` ```shell # "30seconds.txt" was deleted in the commit `3050fc0de` git checkout 3050fc0de^ -- "30seconds.txt" # Restores the 30seconds.txt file ```