git hook for adding a jira ticket number to relevant commits.
Note: It expects relevant branches to have this naming pattern: PREFIX/USER_NAME/JIRA-TICKET
> cd PROJECT_ROOT/.git/hooks/
Replace the prepare-commit-msg.example
with the prepare-commit-msg
file in this gist.
Make the script executable:
> chmod +x prepare-commit-msg
Enjoy!