In this page


This page is about implementing Better Commit Policy specifically in Git repositories managed by the Bitbucket Data Center application. If you use Git, but you don't use Bitbucket Data Center, see the general Git guide instead of this page.

Working with Bitbucket Data Center commit policies

Bitbucket Data Center builds on the top of the Git version control system, extending that with repository-, user- and permission management capabilities. As it is primarily a high-level management layer above Git, everything written in the general Git guide applies to the Git repositories managed by Bitbucket Data Center, too.

In the Better Commit Policy app's context, the only major difference between using Git alone and Git with Bitbucket Data Center is how you install the commit hooks to the central Git repository. (Installing hooks to the local Git repositories is the same for those two cases.)

Installing Bitbucket Data Center hooks

Installing Bitbucket Data Center hooks for remote verification

To ease implementing commit and pull request verification in Bitbucket Data Center, Midori offers a separate Bitbucket app called Better Commit Policy for Bitbucket. It is free and can be installed without generating any license.

After you install that app to Bitbucket and connect Bitbucket to your Jira instance (where Better Commit Policy for Jira is installed), the commit verification functionality becomes available in Bitbucket with a fully native experience! For example, here is a Bitbucket Data Center pull request rejected due to violating the commit policy applied to that repository:

See the Better Commit Policy for Bitbucket documentation for installation and configuration details.

Installing Bitbucket Data Center hooks for local verification

Installing the local hook to a local Git repository which was cloned from a Bitbucket Data Center managed central repository is the same as installing that to any other local Git repository.

See the installing Git hooks for local verification section for detailed instructions.

Bitbucket Data Center commits

In your daily developer workflow, when creating commits and pushing those to Bitbucket Data Center, you can use your Git client exactly the same way as you would with Git alone.

See the Git commits section for detailed instructions.


Ask us any time.