At our company we are moving from svn to git. For issue tracking we use JIRA from Atlassian.
Now we want to enforce that every commit message contains an issue number (just like we did with svn).
We have found the commit-msg hook which we use to reject a commit if it does not contain an issue number.
JIRA uses Fisheye to scan the git repo. If a commit message contains an issue number then the changes are shown under that issue.
The problem is that a hook is not copied when a git repository is cloned. So issue numbers in the commit messages are not enforced. That means that when a new commit is pushed upstream Jira may not list the changes under an issue.
The question is; are we using Git somehow in the wrong way and is there any way to really enforce an issue number in the commit message? Or does any one have simply have a script/hook (other than the commit-msg hook) that accomplishes this?