enable an update hook in bitbucket git repository


I'm looking for way to create a git server side push hook (will be used to enforce referencing JIRA ticket number in each commit message).

According to pro git - git hooks, the git hook to use on the server side is 'update', which exists on .git/hooks dir.

How do I perform it in my bitbucket git repo?



2 answers

1 accepted

At the moment, Bitbucket doesn't support this. We do have an open issue for it though. Please go review it and add your comments!

Will this ever be available for Butbucket Server (not Cloud) ?

Ok, I've created a solution for Bitbucket Server.

It requires filesystem access with admin/root rights to the Bitbucket Server host, but it works fine.

Please see https://github.com/AlexanderAmelkin/bitbucket-git-hooks-for-jira

Although Bitbucket doesn't allow you to configure the server-side hooks, there is a really neat method to verify commit messages using local hooks!

See: Commit Policy with Bitbucket Cloud

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

631 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot