Jira issue number in git commit message

前端 未结 6 1148
生来不讨喜
生来不讨喜 2020-12-28 13:54

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 numbe

6条回答
  •  不知归路
    2020-12-28 14:29

    If you are using default hooks in .git folder then the changes you make in there wouldn't be indexed that simply means they can't be checked out or cloned.

    you can move your commit-message hook in a different folder named as 'hooks' and commit it so that it would overwrite the default hooks from .git.

    We show a message box as an error if commit doesn't contain an issue number so that user can still go ahead if it doesn't need to have an issue tracker number (works in cases of patch / hotfix)

提交回复
热议问题