Skip to content

Instantly share code, notes, and snippets.

@josephmisiti
Created November 20, 2012 16:18
Show Gist options
  • Save josephmisiti/4118932 to your computer and use it in GitHub Desktop.
Save josephmisiti/4118932 to your computer and use it in GitHub Desktop.
function grf(){
# restores file that was deleted. to run
# cd into the directory of the file and type
# grf filename-that-was-deleted
git checkout $(git rev-list -n 1 HEAD -- "$1")^ -- "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment