DEV Community

Discussion on: How to customise your git commit message

Collapse
 
dmerejkowsky profile image
Dimitri Merejkowsky

Nice :)

By the way, since a few git versions, you can also use the hooksPath config variable.

So for instance you could have prepare-commit-msg under version control, in a hooks directory and then tell people to update the .git/config file to look like:

[core]
hooksPath = hooks/
Enter fullscreen mode Exit fullscreen mode

An other possibility is for you to write the same kind of config code in
~/.config/git/config and have your prepare-commit-msgscript in just one place ;)

Hope this helps.