With version 7.4 gitlab changed the behaviour of protected branches in new projects.
In every new project the default branch e.g. master is a protected branch, meaning developers are not able to push to it. In my company a lot of developers work on the default/master branch and are now struggeling when starting a new project.
My Question: Is there a property in the ui or in the gitlab.rb
to restore the pre 7.4 behaviour and to not protect the default branch?
On the left sidebar, select Settings > Repository. Expand Protected branches. From the Branch dropdown list, select the branch you want to protect. From the Allowed to merge list, select a role, or group that can merge into this branch.
A protected branch does three simple things: it prevents pushes from everybody except users with Maintainer permission. it prevents anyone from force pushing to the branch. it prevents anyone from deleting the branch.
Deleting a branch protection rule On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Branches. To the right of the branch protection rule you want to delete, click Delete.
I'm not Sure if the is a default param, but per project you can change master as unprotected , in your project, go to settings -> protected branches and unprotect master
The gilt team published a post related to your question!! https://about.gitlab.com/2014/11/26/keeping-your-code-protected/
I'm not sure what version the feature was added, but in version 8.9.4 you can now select to allow Developers to Push to a protected project.
Also, you now have to click the gear widget dropdown in the upper right to get to the "Protected Branches" options in your project. (See below)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With