This hook helps to automatically put a task number recognized from branch name to the commit message as "Refs: #{ticket-number}".
Written in PHP.
Copy the script into .git/hooks/prepare-commit-msg
file in your project's folder.
Prepare-commit-msg Git hook which adds ticket/task number from branch name to commit msg
PHP