Created
August 9, 2012 18:19
-
-
Save j0hn/3306767 to your computer and use it in GitHub Desktop.
git pre commit hook to ask the user if he ran the tests
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
| #!/bin/sh | |
| # file .git/hooks/pre-commit | |
| exec < /dev/tty | |
| read -p "Did you run the tests? [yN]: " yn | |
| case $yn in | |
| [Yy]* ) echo "Ok, your good to go";; | |
| * ) echo "What are you waiting for then?" && exit 1;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment