Easily restore a deleted file in a git repo

This commit is contained in:
Sami Samhuri 2010-08-10 10:42:08 -07:00
parent 38deb67752
commit 7b87bbb989

4
git-restore Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
FILENAME="$1"
git checkout $(git rev-list -n1 HEAD -- "$FILENAME")^ "$FILENAME"