I accidentally pushed my local master to a branch called origin on gitlab and now it is the default. Is there a way to rename this branch or set a new master branch to master?
Updated:
Prerequisites:
To update the default branch for an individual project:
Search or go
to find your project.Settings
> Repository
.Branch defaults
. For Default branch
, select a new default branch.Auto-close referenced issues on default branch
checkbox to close issues when a merge request uses a closing pattern.Save changes
.To change a default branch name for an instance or group:
Admin Area
.Settings
> Repository
.Default branch
.Initial default branch name
, select a new default branch.Save changes
.