Created
November 12, 2011 13:39
-
-
Save sgoodwin/1360531 to your computer and use it in GitHub Desktop.
.git/hooks/git-commit
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 | |
# | |
# Don't allow commits that aren't mentioning a ticket. | |
# | |
test "" != "$(grep '#[0-9]\+' "$1")" || { | |
echo >&2 You must mention a ticket when commiting! | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment