In this page
Coming to Bitbucket workspaces near you!
Local checks will be gradually rolled out to all installations over 2025Q3.

What is a local check?

Local checks allow developers to verify changes on their local machine, ensuring code quality and adherence to team standards before the commit is created. This early verification helps prevent problems later in the development process, making the team faster and more productive. The earlier you catch a problem, the less time and effort it takes to fix it!

Local checks are an additional layer of verification and do not replace push checks or merge checks. Push and merge checks are the primary mechanism to enforce the commit policy, while local checks help developers catch issues early, reducing headaches and speeding up the workflow.

✨ Better Commit Policy Connector is the only commit checker app for Bitbucket that supports local checks and allows working fast while enforcing a policy!

How to use local checks?

To get a grasp of how local checks work, watch this video:

Local checks use standard Git hooks. When you commit changes locally, Git automatically runs a hook script in your repository. You do not have to do anything!

The hook script calls the app's REST API to perform the checks. It sends the commit author, changed files, commit message, and other details to the REST API endpoint.

It then waits for the check status to determine if the commit complies with the policy:

  • Satisfied: The commit will be successfully created.
  • N violations: The commit will be aborted, and a rejection message will be displayed. Your changes will remain in the local repository. To proceed, fix the reported violations (e.g., by rewriting the commit message) and try committing again.

How to skip local checks?

When using local hooks, ensure you have a working network connection to the app's REST API; otherwise, the commit creation will fail. If you are offline, you can use Git's --no-verify option to bypass hook scripts:

git commit --no-verify

This allows you to work offline, such as when traveling on an airplane. However, be cautious: you might unintentionally create commits that do not comply with the policy. These commits will be rejected when you push them to the repository later. Use this option only when absolutely necessary.

Questions?

Ask us any time.