To install globally, copy prepare-commit-msg
to /usr/local/share/git-core/templates/hooks
and execute:
chmod +x /usr/local/share/git-core/templates/hooks/prepare-commit-msg
To install per-repository, copy prepare-commit-msg
to /path/to/repo/.git/hooks/prepare-commit-msg
and mark it as executable.