In this page

Overview

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

Working with Bitbucket Server commit policies

Bitbucket Server 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 Server, too.

In the Better Commit Policy app's context, the only major difference between using Git alone and Git with Bitbucket Server 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 Server hooks

Installing Bitbucket Server hooks for remote verification

To ease implementing commit and pull request verification in Bitbucket Server, 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 Server 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 Server hooks for local verification

Installing the local hook to a local Git repository which was cloned from a Bitbucket Server 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 Server commits

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

See the Git commits section for detailed instructions.

Questions?

Ask us any time.