Created
September 25, 2015 11:07
-
-
Save dnicolson/99c063195fa5a51eb341 to your computer and use it in GitHub Desktop.
Git pre-push hook for printing a warning message
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
#!/bin/bash | |
printf "You are about to push, have you run ...? [y]\n" | |
read -s -n1 KEY < /dev/tty | |
if [ $KEY = 'y' ]; then | |
exit 0 | |
fi | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment