How to limit pushes, but allow pull requests?

Hi,

 

I want to disallow commits (pushes) to the "develop" branch, because all code needs to be pushed to a separate branch and must me merged to the "develop" branche with a pull request.

 

When I use "Branche management" and limit the pushes, merging the pull request is also restricted.

 

Is it possible to disallow a direct push to a branch, but allow merge of a pull request?

 

 

Marijn

3 answers

This widget could not be displayed.

You can write a pre-recieve hook to deny pushes to certain branches.

This widget could not be displayed.

Hi Harry,

Thank you for your answer. Unfortunately your solution seems to be for Stash only. For Bitbucket this is still a feature request (https://bitbucket.org/site/master/issues/5658/allow-custom-pre-receive-hook-that-rejects).

 

Marijn

This widget could not be displayed.

I'm trying this too! 

Prevent any user from push (https://confluence.atlassian.com/bitbucket/branch-management-385912271.html) has no utility if blocks merge in pull requests!! =/

 

 

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,303 views 8 11
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