How to Delete a Branch on GitHub

Configurare noua (How To)

Situatie

If you’re working in a repository with lots of activity, the number of branches that are created can quickly add up. Basic GitHub etiquette calls for you to delete merged branches or branches no longer required.

Solutie

Pasi de urmat

You can delete a branch using GitHub’s website. However, you’re only able to delete remote branches using this method—you can’t delete local branches from GitHub’s website.

To get started, visit the official GitHub website and log in to your account. Once logged in, select the repository that contains the branch you would like to delete from the left-hand pane.

Select a repo.

Next, click “Branches” below the header menu.

Click Branches.

A list of branches will appear. Locate the branch you’d like to delete and then click the red trash can to the right of it.

Click Delete.

The branch is now deleted. To reflect this change in your local repository, change to the respective directory, checkout the main branch, and then run the git --pull command from the command line.

Tip solutie

Permanent

Voteaza

(9 din 23 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?