Remove Branch - GitHub (Admin):
About:
This document explains how you remove a branch in GitHub.
Delete Protection Rules:
-
Go to GitHub and to the Company page. Go to the Repo in question. Click Settings.

-
Click Branches, and find the correct branch. Delete it.

Remove branch:
-
Click ‘General’ and look for the correct branch and click the ‘arrows’.

-
Then click ‘the correct branch and switch it to ‘master'.

-
Click ‘Update’.

-
Click ' I understand, update the the correct branch.

-
Then click ‘Code’, and ‘master’ and then ‘View all branches’.


-
Then click the trash/bin on the the correct branch branch. Then Confirm.


And you are done. 😄
Sources
- GitHub’s guide to managing a branch protection rule: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule
- GitHub’s guide to changing the default branch: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch
- GitHub’s guide to deleting and restoring branches: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/deleting-and-restoring-a-branch-in-a-pull-request