Creating a branch
You can create a branch in different ways on GitHub Enterprise Server.
Note: You can only create a branch in a repository to which you have push access.
Creating a branch using the branch dropdown
- On your GitHub Enterprise Server instance, navigate to the main page of the repository.
- Optionally, if you want to create the new branch from a branch other than the default branch of the repository, click Branches then choose another branch.
- Click the branch selector menu.
- Type a unique name for your new branch, then select Create branch.
Deleting a branch
您可让头部分支在仓库中的拉取请求合并后自动� 除。 有关详细信息,请参阅“管理分支的自动� 除”。
Note: If the branch you want to delete is the repository's default branch, you must choose a new default branch before deleting the branch. For more information, see "Changing the default branch."
If the branch you want to delete is associated with an open pull request, you must merge or close the pull request before deleting the branch. For more information, see "Merging a pull request" or "Closing a pull request."
- On your GitHub Enterprise Server instance, navigate to the main page of the repository.
- 在文件列表上方,单击 “分支”。
- Scroll to the branch that you want to delete, then click .
如果您在拉取请求合并后� 除头部分支,GitHub 会检查将已� 除分支指定为基础分支的同一仓库中的任何开放拉取请求。 GitHub 将自动更新任何此类拉取请求,将其基础分支更改为合并的拉取请求的基础分支。 For more information, see "About branches."