Property to prevent gitlab from protecting default branches
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?
This is possible in version 12.5:
Global Setting (for all new projects):
- Admin Area > Settings > General > Tab »Visibility and access controls« > Field »Default branch protection«
- Select
Not protected: Both developers and maintainers can push new commits, force push, or delete the branch.
Project Setting (for an existing project):
- Project > Settings > Repository > Tab »Protected Branches« > Field »Protected branch«
- Click
Unprotect
button next tomaster
branch
Please note: The branch protection was introduced for a very good reason:
Git is very easy to use and abuse. A single git push --force command can easily ruin the day for a lot of people.
https://about.gitlab.com/blog/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)
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
Update
The gilt team published a post related to your question!! https://about.gitlab.com/2014/11/26/keeping-your-code-protected/