How to Hide a branch in Azure DevOps

Viewed 392

We have a requirement of isolating the master branch from developers who will be working on the feature branches. The developers should not have the "master" branch displayed.

I have tried with creating the branches and setting the branch policies but it doesn't work, there is no such option of hiding the master branch from displaying to the developers.

Is there any other way like using sub modules to isolate the master branch from the developers ? If so please share the procedure to create Sub modules in AZURE DevOps.

1 Answers

There is no way to hide a branch in azure devops currently.

Submodule will not be able to isolate the master branch either. For you can get the submodule source content with command git submodule update --init --recursive.

Above comments have good points. If master is hidden from developers, they will be not able to merge their codes to the master branch, nor will they be able to pull the latest code from master branch.

And Azure devops provides branch policy settings and branch permission settings which allow you to protect the master branch.

Check out below documents for more information:

Improve code quality with branch policies

Set branch permissions

Lock a branch

Related