How to Delete a Branch in GitHub
Of course, you can delete a remote branch using Git. But if you are relying on GitHub, you can also delete a branch directly from GitHub web interface in very simple steps.
Here's how to that.
Deleting a branch on GitHub
Go to your Repository and click on the branch button at the top, as highlighted in the image below 👇
Click on the View all branches
button at the bottom of the popup.
Find the branch you want to delete, and click on the bin Icon on the far right.
Once you click on it, the branch will be deleted and a restore button will appear. Reload the website and the branch will be gone.
How to restore a Deleted Branch?
To restore, you need to click on the Restore button that immediately appears once you delete the branch, as shown in the image below 👇
Conclusion
I know that purists prefer using git commands for this purpose. But I think to use Git, you don't have to go through the command line. Integrate Git into workflow. Add it to your code editor and do the commits and push the changes from there. And if you host your code on GitHub, utilize the web interface for easily managing the repositrories.
Thanks for reading, I hope you got some help from this article, keep learning, keep GitHubing & take care 😄