In this page


This page is about implementing Better Commit Policy specifically in Git repositories hosted by the service. If you use Git, but not, please see the general Git guide instead. Or, if you use GitLab Community Edition (CE) or GitLab Enterprise Edition (EE), not, see the Git with GitLab Self-Managed guide instead.

Working with commit policies hooks: the limitation is a public cloud-based service operated by its own team. Being a managed service, it doesn't give access the filesystem where the central repositories are stored, therefore you cannot manually install Git hooks to those. has no web-based feature to manage Git hooks, either.

It means that does not allow using custom server-side hooks currently.

As Better Commit Policy relies on server-side hooks for server-side verification, you can implement Better Commit Policy only in the local repositories for at the moment.

There are no other limitations. All features of the Better Commit Policy app work 100% also for hosted repositories. hooks: the solution

To work around the limitation caused by missing server-side hooks, use local hooks consistently.

Note that it is possible to reach the same level of safety by using local hooks only as by using server-side hooks. For that, all developers in your team should activate local verification in their local repositories. It guarantees that only verified commits will be pushed to the central repository hosted by

The ultimate solution

Although the current solution works fine, we will absolutely implement server-side verification also for as soon as they support custom server-side hooks. Note that only the team can remove this blocker.

To indicate its importance:

  1. Please open a ticket in the support system. Ask for the feature "Support for custom pre-receive hooks" and explain your use case in short. As it takes only 2 minutes of your time, absolutely do this. The more tickets opened with this feature request, the higher probability it will be implemented.
  2. Also, there is a counter-part feature request at Midori. Although the feature request must be solved first, we use this one to collect feedback and interest on our side. Vote for this by clicking the "thumbs-up" icon, add your use case as a comment and click "Follow". All future updates on this story will be posted there.

Installing hooks

Installing hooks for local verification

The process is straight-forward:

  1. Create the commit policy. (It must be done once.)
  2. Ask all your developers to install the corresponding hook script to their local repositories. (It's a self-service process everyone can complete in minutes.)

That's it. commits

In your daily developer workflow, when creating commits and pushing those to, you can use your Git client in the usual way. Looking from the client side, will be totally transparent for you: it will be "just a Git server".

See the Git commits section for detailed instructions.


Ask us any time.