Skip to content

Home

Restore a deleted file

Restores a file deleted in a specific commit.

git checkout <commit>^ -- <file>

# Examples
# "30seconds.txt" was deleted in the commit `3050fc0de`
git checkout 3050fc0de^ -- "30seconds.txt"
# Restores the 30seconds.txt file

More like this

Start typing a keyphrase to see matching snippets.