Unable to change Default Branch due to HEAD branch name
Summary
After updating the default branch from master
and saving changes, the default branch is reverted immediately to master. This appears to be due to having a branch name HEAD
. See #20474 (comment 215095866) for context.
Steps to reproduce
-
Under Default Branch, change the branch from
master
to any other existing branch -
Press "Save changes"
-
Press "Expand" again, and see that the default branch is still master. Merge requests still default to master.
What is the current bug behavior?
Master remains the default branch.
What is the expected correct behavior?
The chosen default branch should become the new default.
Output of checks
This bug happens on GitLab.com
Possible fixes
This happened directly after we ran into the .lock issue described here https://gitlab.com/gitlab-com/support-forum/issues/1804. We filed a ticket to have our .lock file removed, and since then our default branch is locked to master.
Workarounds
Delete the branch name HEAD if not the default branch.
git push -d origin HEAD