Skip to content

Instantly share code, notes, and snippets.

@aaronstaves
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save aaronstaves/15dba763c2bde0e6bb1d to your computer and use it in GitHub Desktop.

Select an option

Save aaronstaves/15dba763c2bde0e6bb1d to your computer and use it in GitHub Desktop.
JIRA commit-msg hook
#!/bin/bash
line=`head -n 1 "$1"`
if [[ ${#line} == 0 ]]
then
echo "No commit message, commit aborted"
exit -1
else
exit 0
fi
# Put in BASE_DIR/.git/hooks/commit-msg. Make Executable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment