GitHub Delete Branch in Few Steps

onestop_databy:

Github

This short tutorial will teach you how on GitHub delete branch using the command line and the website interface.

1. Deleting Branch Using Command Line

Open your terminal, and enter the git you want to delete the branch. Now all you have to is to runt the following command line:

$ git push origin --delete <branch>

You should see a message similar to the following:

To github.com:my_account/YOUR_REPO.git
 - [deleted]         <branch>

Please change <branch> to your branch name. In my case it was test-branch.

2. Deleting Branch Using the Web Interface

On the git web interface, all you need to do is to to the branches sequence for the repository you want to delete the branch such as (https://github.com/<USER>/<REPOSITORY>/branches, find the branch you want to delete and click in the trash can icon.

More Resources

Here are three of my favorite GitHub Books in case you want to learn more about it.

Conclusion

In summary, this tutorial showed two ways to delete your GitHub Branch. One using the command line and the other using the GitHub web interface. If you knew to Git, I would remove sticking to the Web Intercafe, and maybe you read other tutorials from this website, you can start using the website version of the program.

Related Posts