Skip to content

Instantly share code, notes, and snippets.

@alexec
Created November 22, 2014 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexec/86604906d09d55aeba7b to your computer and use it in GitHub Desktop.
Save alexec/86604906d09d55aeba7b to your computer and use it in GitHub Desktop.
.git/hooks/commit-msg
#! /bin/sh
set -eu
if [ $(cat $1|grep -c '^[A-Z]*-[0-9]* \|Merge\|release') -eq 0 ]; then
echo "non-merge/release commit messages must start with a ticket ID" > /dev/stderr
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment