Skip to content

Instantly share code, notes, and snippets.

@cccaldas
Created April 11, 2012 20:21
Show Gist options
  • Save cccaldas/2362176 to your computer and use it in GitHub Desktop.
Save cccaldas/2362176 to your computer and use it in GitHub Desktop.
git-restore-file
# $1 - commit
# $2 - file
# usage: git-restore-file {commit} {file}
# example: git-restore-file 6fe4857 folder/todo.diff
git show $1:"$2" > "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment