In this page


This page is about implementing Better Commit Policy with the Git version control system and If you use Git alone (i.e. without, please see the Git page instead. is the cloud version of the GitLab product. It should not be mixed with GitLab Community Edition and with GitLab Enterprise Edition, which are self-hosted solutions for Git management, and which are also supported by Better Commit Policy.

Working with commit policies

The primary problem with is, that it does not allow users to customize the server-side hooks in their repositories. This is a deliberate design decision by, because freely modifying hooks could easily lead to bugs and security issues.

As Better Commit Policy integrates with Git using hooks, this is not possible to implement Better Commit Policy directly in the managed server-side repositories. Wait, just read on, because there is a viable solution though!

What you can absolutely do is executing the verification in the developers' own clone repositories! When all your developers install the hooks to their local clone repositories, then this scenario is essentially equivalent with installing the hooks to the blessed repository itself. This way you get the best of both worlds: hosting your repositories in the cloud, and verifying the commits pushed into that at commit time (in local clones).

Installing commit policies

The process looks like this:

  1. Create the commit policy.
  2. Send an email to all your developers and ask them to install the hook script for this policy to their local repositories.

Please note that a "share policy" feature that eases distributing and monitoring the hook script installation will be implemented soon. If this is valuable to you, please vote to the public feature request.

Has every team member installed the hook script?

First the bad news: this is not possible to strictly enforce the installation of the hook scripts. Why? If the hook script is not installed, then your Git is basically not talking to Jira, so Better Commit Policy cannot know about your repository at all.

Nevertheless, administrators still have the possibility to keep their eyes on the commits, to spot the ones that are eventually violating the policy. For example, if you know that the policy requires mentioning a Jira issue, and a committer is sending commits without that, then clearly: he forgot to install the hook script! Contact him and ask him to do so.

We have an idea for a creative solution for this problem, using a post-mortem mechanism to automagically detect these missing installations. If this is valuable to you, please vote to the public feature request.

No other limitations

Other than the inability to install directly to the blessed repository, all features of the Better Commit Policy for Jira work without limitations, also for managed repositories.


Ask us any time.