How to create a global git commit hook by Matt Venables
1 Enable git templates (This tells git to copy everything in ~/.git-templates to your per-project .git/ directory when you run git init):
git config --global init.templatedir '~/.git-templates'
2 Create a directory to hold the global hooks:
mkdir -p ~/.git-templates/hooks