This post is part of the complete guide on Git and Github
On Github, you can easily create or delete branches from a Github Repository.
What Are Branches?
Branches are virtual environments that you can make changes within a container that does not impact the other branches.
Create a New Branch on Github
On a Github repository that you own, in the “Code” tab, click on the branch dropdown at the top left.
Then, click on “View all branches”.

From that window, click on “New branch”.

Name the branch and select the Branch source.

If your repository is a Fork, select your fork or the original repository as the branch source.

Next, a comment saying “Branch <branch-name> will be created shortly

Below you see a comment saying “Your main branch isn’t protected”, that simply is a reminder to protect your default branches.
Going back to your code tab, you can see that the new branch was created.

Delete a Branch from Github
Again, back to the main page of your repository (“Code” tab), from the branches dropdown, click on the “View all branches” button.

From there, click on the garbage can next to the branch that you want to delete.

Come back to the main tab of your repository and check if the branch is still showing in the dropdown.

Restore a Deleted Branch on Github
To restore a deleted branch on Github, all you need to do is navigate the branches dropdown and click on “View all branches”.

Then, you can just as easily click on the “Restore” button next to your branch.

Conclusion
This is it, we now have learned how to create and delete branches on Github.

SEO Strategist at Tripadvisor, ex- Seek (Melbourne, Australia). Specialized in technical SEO. In a quest to programmatic SEO for large organizations through the use of Python, R and machine learning.