Restrict Git commit message to certain pattern
For certain reason, some time you want your commit message to follow a standard pattern.
i.e. PJK-001: my message
Want to have a project code and assignment code there.
Now, open up your project git directory.
and edit commit-msg file (if doesn’t exist, create it)
(NOTE: This example I’ll write in Python)
Simple right? But don’t remember to change it to executable and no
$ chmod 755 /path/to/your/project/.git/hooks/commit-msg