Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Block users from creating new branch

Surrender Mohan November 18, 2022

Have a common repo which is being used by 5k+ users. Is there a way to block users from creating new branch? Currently whats happening is - users either fork the repo OR create a new branch and raise a PR. When new branch is created and PR is raised by users, while doing PR merge we do get an checkbox to select "delete branch" after PR merge however forgetting to select the option and PR's are merged.

This is creating new branch every-time on the repo when PR is merged without selecting the "delete branch" option. Is there a better way to follow or restrict users from creating new branch?

 

please advise.

1 answer

1 accepted

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 19, 2022

Hi @Surrender Mohan and welcome to the community,

I don't think that you can prevent user from branch creation. In bitbucket there is branch restrictions https://support.atlassian.com/bitbucket-cloud/docs/use-branch-permissions/

E.g. you add a branch and a branch pattern and select one of the available restrictions and then you add a group exception (for those who you want to actually be able to create branches).

Hope that helps.

Surrender Mohan November 19, 2022

Thanks for the response, will review further

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events