Note :
You need to have python installed on your machine to use this hook.
-
Copy file to your project.
cp git-hooks/prepare-commit-msg your-project/.git/hooks/
-
Move to your project.
cd your-project
-
Make it executable
chmod +x .git/hooks/prepare-commit-msg
-
Change your branch with the following pattern :
issue-[number]-[short-description-of-your-issue]
-
Changes any file to test the hooks, add it, and commit with -m argument. Example :
git commit -m "Add index.html inside assets folder"
-
Result
The number issue should be added automatically in commit message
-
Done!.