Created
November 22, 2014 13:09
-
-
Save alexec/86604906d09d55aeba7b to your computer and use it in GitHub Desktop.
.git/hooks/commit-msg
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/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