Branch permissions to prevent branching from master

I know about repository and branch permissions. I know that branch perms only control which users/groups can commit/push/delete a given branch or branches within that repo. But what I would realy like is a branch perm that controls even the visibility, and therefore the availability of branching from a specific branch or branches. For example, I'd like only system admins (users who are members of the stash-admins group) to be able to branch from 'master', and allow everyone else to only branch from the 'development' and sundry feature branches. For those who are not in stash-admins, I don't even want them to see the 'master' branch in the "Branch from" drop-down in Stash's "Create branch" screen. Do-able?

1 answer

1 accepted

0 vote

Hi Christopher,

With git, you can't restrict visibility to only part of the branches to some people. After all, when someone clones the repository they have access to the full history in their local clone. Once they've got the branch locally, they can do whatever they want (Stash is out of the loop).

However, if you really want to restrict branch visibility to a select group of users, you could create a fork of the repository and only create the branch in the fork. You can then restrict access to that fork.

Hope that helps!


Thank you, Michael. Since we're militarizing on branching only from JIRA issues via Stash app linking, and nowhere else, I had hoped that there might be a way, from the user and group permissions perspective of Stash, to inhibit the creation of branches from master for all those except admins. I suppose this will just have to be a policy and education matter. Thanks.

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...

31,477 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