Easily restore a deleted file in a git repo
This commit is contained in:
parent
38deb67752
commit
7b87bbb989
1 changed files with 4 additions and 0 deletions
4
git-restore
Executable file
4
git-restore
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
FILENAME="$1"
|
||||||
|
git checkout $(git rev-list -n1 HEAD -- "$FILENAME")^ "$FILENAME"
|
||||||
Loading…
Reference in a new issue