How do I make "master" the default branch name on my future projects?

As per title - I dislike the recent change, and going forward I would like my new projects to have “master” as its default branch.

How do I go about this?

Menu → Admin → Settings → Repository → Default initial branch name

I do not see “Admin” in the Menu.

This is on your own server? If so, then maybe your login isn’t an admin. If this is on gitlab.com, then you can’t change the default behaviour. This is controlled by the Gitlab team since they are the Admin’s of their own site/servers.

Well, that’s disappointing - so if we don’t want to deal with the politically-correct renaming of the default branch we have to create a new one pointing to main, and then delete main. Even Github allows you to choose a default branch name for all your repos.

You can do it at a group level on GitLab.com in the repository settings for the group

1 Like