Skip to content

HEAD: default to main for new repositories

Zeger-Jan van de Weg requested to merge zj-switch-default-ref-main into master

HEAD in bare repositories has the function to determine what the default reference is. This helps GitLab decide what the target default is for merge requests and what README to render on the project page.

This change changes the default for new repositories to main over master. For almost no-one this would influence their current repository. There's an exception though; old repositories might have a corrupt HEAD reference, e.g. it does not exist. In that case Gitaly now will favour main over master.

Closes: https://gitlab.com/gitlab-org/gitlab/-/issues/331906

Edited by Zeger-Jan van de Weg

Merge request reports