- Add script above to:
.git/hooks/prepare-commit-msg - Make executable
chmod +x .git/hooks/prepare-commit-msg.
Any branch with names using JIRA ticket ids like ABC-1234-anything or DEF-234, will have the JIRA identifier prepended to commit messages.