You can create or delete branches directly on GitHub.

In this article

Were you able to find what you were looking for?

 

Creating a branch

  1. On GitHub, navigate to the main page of the repository.

  2. Optionally, if you want to create your new branch from a branch other than the default branch for the repository, click  NUMBER branches then choose another branch:

    Creating and deleting branches within your repository

     

  3. Click the branch selector menu.

    Creating and deleting branches within your repository

     

  4. Type a unique name for your new branch, then select Create branch.

    Creating and deleting branches within your repository

     

Deleting a branch

You can have head branches automatically deleted after pull requests are merged in your repository. For more information, see "Managing the automatic deletion of branches."

You can't delete a branch if it's currently associated with an open pull request.

  1. On GitHub, navigate to the main page of the repository.
  2. Above the list of files, click  NUMBER branches.
    Creating and deleting branches within your repository
  3. Scroll to the branch that you want to delete, then click .
    Creating and deleting branches within your repository

相关文章:

  • 2021-05-09
  • 2022-12-23
  • 2021-06-24
  • 2021-11-19
  • 2021-09-05
  • 2021-11-15
  • 2022-01-04
  • 2022-01-09
猜你喜欢
  • 2021-09-02
  • 2021-12-29
  • 2021-09-15
  • 2022-12-23
  • 2021-09-19
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案