banner



github how to delete a branch

Creating a branch

  1. On GitHub.com, 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: Branches link on overview page

  3. Click the branch selector menu. branch selector menu

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

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."

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."

  1. On GitHub.com, navigate to the main page of the repository.
  2. Above the list of files, click NUMBER branches. Branches link on overview page
  3. Scroll to the branch that you want to delete, then click . delete the branch

If you delete a head branch after its pull request has been merged, GitHub checks for any open pull requests in the same repository that specify the deleted branch as their base branch. GitHub automatically updates any such pull requests, changing their base branch to the merged pull request's base branch. For more information, see "About branches."

Further reading

  • "About branches"
  • "Viewing branches in your repository"
  • "Deleting and restoring branches in a pull request"

github how to delete a branch

Source: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-and-deleting-branches-within-your-repository

Posted by: ortegawhatife1996.blogspot.com

0 Response to "github how to delete a branch"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel