Skip to content

Instantly share code, notes, and snippets.

@jamesbloomer
Created September 23, 2014 11:31
Show Gist options
  • Save jamesbloomer/fe23909ef1ee955c849c to your computer and use it in GitHub Desktop.
Save jamesbloomer/fe23909ef1ee955c849c to your computer and use it in GitHub Desktop.
Commit msg check
#!/bin/sh
grep -E -q 'DF-[0-9]{4}' $1 || {
echo >&2 "No ticket number DF-XXXX in commit message"
exit 1
}
@jamesbloomer
Copy link
Author

save it as .git/hooks/commit-msg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment