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

Branch permissions to prevent branching from master

Christopher Watson June 5, 2014

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 votes
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2014

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!

Michael

Christopher Watson June 5, 2014

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
TAGS
AUG Leaders

Atlassian Community Events