Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #20474
Closed
Open
Issue created Dec 19, 2017 by Gareth Dwyer@sixhobbits

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

  1. Visit Settings->General->Expand image

  2. Under Default Branch, change the branch from master to any other existing branch

  3. Press "Save changes"

  4. 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

Edited Nov 16, 2020 by Cleveland Bledsoe Jr
Assignee
Assign to
Time tracking