If your first (default) branch is not named "master", the first feature branch will become the default and will be protected
I'm using GitLab CE 7.10.1 installed with the omnibus package (7.10.1~omnibus.2-1) on Ubuntu 14.04
Here's how to reproduce :
- Create a group (I don't know if it's involved in this behavior)
- Create a new project in this group
- Prepare your local repo : git init, add your files, commit locally and add your origin
- Now rename your local "master" branch to something (say "production") : git branch -m master production
- Push it upstream : git push -u origin production
- Your gitlab repository now contains one branch "production" set as the default branch and protected - all good
- Now create a local feature branch named "feature_xxx", modify some files and commit locally
- Push it upstream : git push -u origin feature_xxx
- This is where the problem happens. Your gitlab repo now have two branches "production" and "feature_xxx". The "production" branch is no longer the default one (but stays protected). "feature_xxx" becomes the default branch and is set as protected.
What is weird is that it only happens for the first feature branch. If you create another branch "feature_yyy", it will not be protected or set as the default branch (which is the correct behavior).
So for the first feature branch, you have to manually unprotect it so other people can contribute.
It doesn't seem to happen if you keep the first branch pushed named "master"
Can anyone confirm this behavior ?
Cheers