A local check is a commit policy verification that runs on the developer's machine at git commit time, before the commit object is created. This capability was previously available only in Bitbucket Data Center. It is now available in Bitbucket Cloud.
The difference from merge checks is when the violation is caught. A violation caught at merge time may block a pull request, involve reviewers, and require rebasing multiple commits. The same violation caught at commit time takes seconds to fix: the developer rewrites the message and tries again, nothing else was created.
What is a local check?
A local check is a policy verification that runs on the developer's machine when they run git commit. It uses a standard Git commit-msg hook that is checked into the repository alongside the code. Because the hook lives in the repository, every developer who clones or pulls gets it automatically, with no manual distribution or installation required.
When a developer commits, the hook calls the Better Commit Policy cloud check service, which evaluates the commit against the active policy and returns the result. The whole sequence happens behind the scenes. In practice, the developer either sees a confirmation that the commit was accepted or a clear message listing the violations, with their changes still staged so they can fix and retry.
✗ 1 violation found Commit message must start with a valid Jira work item key (e.g. PROJ-123) Fix the violation and commit again.
Local checks work with any standard Git client: CLI, GUI clients, and IDE plugins.
Why this matters: the cost of late detection
Every policy violation has a cost that grows the later it is caught:
- Before commit: Almost nothing. Rewrite the message and commit again. Seconds.
- At merge time: The pull request is blocked. Reviewers are involved. The fix requires coordination and may require rebasing multiple commits. Hours.
- In CI/CD or audit: The branch or release is compromised. The paper trail is broken.
Local checks compress that cost to the minimum possible. Violations are caught when they are cheapest to fix.
Local checks do not replace merge checks
Local checks are an additional layer, not a replacement for merge checks. Merge checks remain the primary enforcement mechanism and enforce policy for all developers, including those who have not enabled local checks.
Think of it this way: merge checks are the guarantee. Local checks are the developer experience optimization that prevents the guarantee from ever needing to fire.
The only Bitbucket Cloud app with local checks
Bitbucket Cloud does not support custom server-side hooks. This is a platform constraint, not a configuration option. The enforcement options available natively (branch permissions and merge checks) can catch violations at merge time, but they cannot run on the developer's machine.
Better Commit Policy Connector for Bitbucket Cloud is the only commit checker app for Bitbucket that supports local checks. There is no native equivalent and no other Marketplace app provides this capability.
For a full walkthrough of how local checks work in practice, watch the tutorial:
How to enable local checks
Enabling local checks takes two steps, both quick.
Step 1: Add the resource files to the repository (one-time, per repository)
This is done once by any team member with write access:
- Go to the repository in Bitbucket → Apps → Commit policy
- Click the Settings button
- Click Add next to any missing resource files
- Confirm both files are healthy
Step 2: Enable the local check on each developer's machine (one-time, per clone)
The app includes a step-by-step setup wizard:
- Go to the repository in Bitbucket → Apps → Commit policy
- Click Enable local check
- Follow the wizard steps
- Run the integrity test as prompted
Once complete, the local check runs automatically on every new commit in that clone.
Skipping local checks when needed
There are situations where a developer may need to skip the local check, such as working offline or dealing with a temporary server-side issue. The app provides two options:
Skip a single commit by including the skip pattern in the message (default: #skipcheck):
git commit -m "Fix a typo #skipcheck"
Temporarily disable the local check with a Git config setting:
git config midori.check.skip true # disable for this repository only git config --global midori.check.skip true # disable for all repositories git config --unset midori.check.skip # re-enable (single repository) git config --global --unset midori.check.skip # re-enable (global)
✋ Not using Better Commit Policy Connector yet? It works together with Better Commit Policy for Jira Cloud to give you centralized, policy-as-code commit enforcement across your Bitbucket Cloud workspace, including local checks, merge checks, PR title and description validation, and Jira workflow integration.
Do local checks work with GUI Git clients and IDEs?
Yes. Local checks use a standard Git commit-msg hook, which is triggered by any Git client that creates commits: CLI, GUI clients like SourceTree or GitKraken, and IDE plugins like JetBrains or VS Code. The output format varies by client but the enforcement behavior is identical.
What happens if a developer works offline?
Local checks require an internet connection to call the Better Commit Policy cloud service. For offline work, developers can skip the local check for a single commit using the skip pattern (default: #skipcheck in the commit message) or temporarily disable it entirely with git config midori.check.skip true.
What this means for regulated teams
For teams subject to SOX, HIPAA, ISO 9001, IEC 62304, or similar standards, every commit entering a release must be tied to an authorized work item and must meet policy. Violations that slip past local checks are still caught by merge checks, but violations that never occur in the first place leave a cleaner audit trail with zero remediation effort.
Local checks make it easier for developers to do the right thing by default. The policy is enforced at the point where it costs the least and interrupts the work the least.
Get started
Local checks are available now for all Bitbucket Cloud workspaces using Better Commit Policy Connector for Bitbucket.
Try local checks now!