It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to limit pushes, but allow pull requests?

Marijn Otte Jul 09, 2015



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?




3 answers

0 votes
HarryH Jul 10, 2015

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

0 votes
Marijn Otte Jul 13, 2015

Hi Harry,

Thank you for your answer. Unfortunately your solution seems to be for Stash only. For Bitbucket this is still a feature request (



0 votes
Gabriel Paladino Nov 14, 2015

I'm trying this too! 

Prevent any user from push ( has no utility if blocks merge in pull requests!! =/




Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

3,311 views 1 22
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you