Created
April 11, 2018 09:35
-
-
Save robatwilliams/ce1ca6b2dc2a5ca6701db8841c75d2d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# put in ~/.bashrc | |
alias git='gitwrapper' | |
gitwrapper () { | |
if [ "$1" == 'reset' ] && [ "$2" == '--hard' ]; then | |
\git status --short | |
read -n 1 -p 'Continue with hard reset (y/n)? ' answer | |
if [ "$answer" == 'y' ]; then | |
echo | |
\git "$@" | |
fi | |
else | |
\git "$@" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment