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

Prevent viewing of branch

Richard Masci October 22, 2018

I want to make a repository public, but I only want it to be public for the Master branch.  We may have things in the branches we don't want everyone to see, or if a developer hardcodes a password or some other thing that isn't going to make it into the master code that we don't want general users to be able to read.

1 answer

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 22, 2018

Hi Richard,

Welcome to the Atlassian Community.

Git/Bitbucket does not have a functionality that allows you to set permissions on who can view specific branches. A branch in Git is just a pointer to commits. 

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 22, 2018

One workaround would be to have two repositories, and the public one would only have the master branch that you update every time your private repository merged anything to master.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events