enable an update hook in bitbucket git repository

Hi,

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?

Thanks,

Benny

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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,736 views 26 12
Join discussion

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