Restores file that was deleted in a previous commit based on its last known state before it was removed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|### Git Unremove ##|
|# Adds an alias called "unrm" to retrieve a pile or path deleted at any point in the repositories history.|
|# git unrm [path]|
|# git unrm path/to/file|
|git config --global alias.unrm '!COMMIT=$(git log -1 --pretty=%h -- "$1"); git checkout $COMMIT^ -- "$1"; echo "File: $1, was restored from commit $COMMIT"; git show -s $COMMIT'|