About changing the default branch
You can choose the default branch for a repository. The default branch is the base branch for pull requests and code commits. For more information about the default branch, see "About branches."
Note: If you use the Git-Subversion bridge, changing the default branch will affect your trunk
branch contents and the HEAD
you see when you list references for the remote repository. For more information, see "Support for Subversion clients" and git-ls-remote in the Git documentation.
基本要求
To change the default branch, your repository must have more than one branch. 更多信息请参阅“创建和删除仓库中的分支”。
Changing the default branch
- 在 GitHub Enterprise Server 上,导航到仓库的主页面。
- 在仓库名称下,单击 Settings(设置)。
- 在左侧菜单中,单击 Branches(分支)。
- 在默认分支下拉菜单中,选择新的默认分支。
- 单击 Update(更新)。