Skip to content

Instantly share code, notes, and snippets.

@sgoodwin
Created November 12, 2011 13:39
Show Gist options
  • Save sgoodwin/1360531 to your computer and use it in GitHub Desktop.
Save sgoodwin/1360531 to your computer and use it in GitHub Desktop.
.git/hooks/git-commit
#!/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