[フレーム]
Last Updated: December 03, 2019
·
337
· pwpearson

Bash function to restore a deleted file in a Git repository

Add to .bashrc or .bashprofile
```
function git
undeletefile () {
if [ $# -eq 0 ]; then
echo "Usage: git
undelete_file <filepath>";
exit 1;
fi

git checkout $(git rev-list -n 1 HEAD -- "1ドル")^ -- "1ドル"
}
```

AltStyle によって変換されたページ (->オリジナル) /