I’ve started getting rid of references to master
branches in all of my repositories. It’s rather easy with Gitlab, but I thought I would document the steps for anyone struggling with it.
Click Repository -> Branches
:
Click New Branch
and name it main
:
Click Settings -> Repository
:
Expand Default Branch
and choose main
:
Scroll down and expand Protect Branches
, protect main
branch and allow Maintainers
to merge and push.
Click Unprotect
next to the master
branch:
Click Repository -> Branches
:
Delete “master” branch:
That’s all there is to it. I am disappointed that there doesn’t seem to be a way to set this at my account level, maybe they’ll do that in the future.