> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Delete a Branch in GitHub
- URL: https://linuxhandbook.com/github-delete-branch/
- Published: 2023-10-31T12:02:54.000Z
- Updated: 2024-03-20T13:36:53.000Z
- Description: A simple tutorial showing the steps for deleting branches from GitHub repository using the web interface.
- Author: Prakhar Tiwari
- Tags: GitHub Fundamentals, #docs-col

Of course, you can [delete a remote branch using Git](https://linuxhandbook.com/git-delete-branch-remote/). 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 👇

![](https://linuxhandbook.com/content/images/2023/10/Screenshot-from-2023-10-18-19-43-34.png)

Branch Selector Button in a GitHub Repo

Click on the `View all branches` button at the bottom of the popup.

![](https://linuxhandbook.com/content/images/2023/10/Screenshot-from-2023-10-18-19-43-44.png)

View all branches link inside branch selector button in a GitHub Repo

⚠️

Please be sure about deleting the branch as it doesn't ask for any confirmation and deletes the branch right away.

Find the branch you want to delete, and click on the bin Icon on the far right. 

![](https://linuxhandbook.com/content/images/2023/10/Screenshot-from-2023-10-18-19-44-34.png)

Delete branch button in all branches list page

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?

🚧

It's only possible immediately after its deletion. If you reload the page or close it, the branch is deleted forever. 

To restore, you need to click on the Restore button that immediately appears once you delete the branch, as shown in the image below 👇

![](https://linuxhandbook.com/content/images/2023/10/Screenshot-from-2023-10-18-19-48-35.png)

Restore Branch Button

## 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 😄