Create a symlink like from your project root like
ln -s -f ../../git-hooks/prepare-commit-msg.sh .git/hooks/prepare-commit-msg
The name of the file must be "prepare-commit-msg" for Git to pick it up.
OR
For git >= 2.9
you can use git config core.hooksPath git-hooks
Make sure it is executable. chmod +x .git-hooks/prepare-commit-msg.sh
Disable Fast Forward Merges : git config branch.master.mergeoptions "--no-ff"