My Profile Photo

Sheogorath's Blog

GitLab initial default branch

Today I learned how to adjust the initial default branch in GitLab. It requires version 13.2.0 or higher to have this feature available and it’s available in the Admin section under Settings > Repository > Default initial branch name. There you can rename your branch from master to hans-günther or whatever you prefer your first default branch should be called if it’s created by GitLab.

GitLab intial default branch settings option in the admin panel

I came across that because a few days ago, I thought about changing the name, but the setting wasn’t available in 13.1.x and today, I came across it randomly and happily changed it.

Note: This will only change the initial default branches. It has no impact on existing projects.