Installation. Create a folder in your project root called githooks
and save the commit-msg
file in there.
The githook can then be installed by symlinking them to your .git/hooks dir.
Run these commands from the project root
$ ln -s ../../githooks/pre-commit .git/hooks/
$ ln -s ../../githooks/commit-msg .git/hooks/
Using a symbolic link will keep your hook up to date with changes in the repo.