How can I restrict developpers to only push to feature/*?

This question is in reference to Atlassian Documentation: Branch permissions

We are following the git flow pattern, and we would like to enforce developpers to push to feature/* to follow the workflow. Only administrators should be able to push and merge in master and develop. How can we achieve this?

1 answer

1 vote

Administrators should have a "Branch permissions" item in the repo settings where you can specify all of this. It sounds like you'd just need to set permissions on "master" and "develop" so that only the administrator group (or a list of individual admins) is permitted to push or merge to those branches. Any branch not specified in the list would then be open to anyone 

More info: https://confluence.atlassian.com/bitbucket/branch-permissions-385912271.html

Thank you for your answer! But this is exactly what we configured in the branch permissions tab of our repository, and this doesn't prevent developpers from creating branches named "random" which break the git flow integration of source tree!

The idea is to prevent them from creating anything else than `feature/*` branches.

Did you ever figure this out @Maxime Rossini1 or @James Redmond? We have the same question. I know that I can set perms to prevent devs from writing into develop, but I want to stop anyone from being able to create a branch called 'ABC-123' off of develop...we want them to only be able to create branches like 'feature/ABC-123' but it looks like maybe this option is only available in Bitbucket Server? Can you or anyone else confirm?

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,738 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