Last active
October 20, 2017 15:21
-
-
Save kerbyfc/ec3178b75803e1adf5cba77ff92d2c48 to your computer and use it in GitHub Desktop.
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
function gre () { | |
git fetch | |
if [ "$1" != "" ] | |
then | |
echo "Reset to origin/\e[34m$1\e[0m" | |
git reset --hard origin/$1 | |
else | |
echo "Reset to origin/\e[34m$(git rev-parse --abbrev-ref HEAD)\e[0m" | |
git reset --hard origin/$(git rev-parse --abbrev-ref HEAD) | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment