Skip to content

Instantly share code, notes, and snippets.

View AlexFlasch's full-sized avatar

Alex Flasch AlexFlasch

View GitHub Profile
@infusion
infusion / git-restore-file.sh
Created May 22, 2016 22:23
Find and restore a deleted file in a Git
# Find last commit for the deleted file
git rev-list -n 1 HEAD -- $path
# Checkout the commit before the the delete happened
git checkout $commit^ -- $path