Change Default branch in gitlab

前端 未结 13 2210
[愿得一人]
[愿得一人] 2020-12-07 19:35

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 maste

13条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 19:56

    See also GitLab 13.6 (November 2020)

    Customize the initial branch name for new projects within a group

    When creating a new Git repository, the first branch created is named master by default.

    In coordination with the Git project, broader community, and other Git vendors, GitLab has been listening to the development community’s feedback on determining a more descriptive and inclusive name for the default branch, and is now offering users options to change the name of the default branch name for their repositories.

    Previously, we shipped the ability to customize the initial branch name at the instance-level and as part of 13.6, GitLab now allows group administrators to configure the default branch name for new repositories created through the GitLab interface.

    See Documentation and Issue.

提交回复
热议问题