I've made a new branch on my GitHub repository, and decided I didn't need the changes. Where can you delete the branch online?
If you’ve made changes to a branch, then decided never mind, these aren’t the changes that need to be made, there’s a way to easily clean up the mess. Just delete the branch in GitHub.
To do that, open your repository in GitHub.com, click the Branches button, then click the trashcan icon beside the branch you want to delete. If you’re not an administrator, you can only delete your own branches; you also can’t delete locked branches like the main Master branch or other protected branches.
Or, if you did want to keep the changes but also wanted to clean up your GitHub repository and get rid of the new branch, you’ll first need to merge the changes. Create a new pull request from your new branch, merge the changes into Master from that pull request, then close the pull request. GitHub will then show an option to delete the branch as it’s now redundant.
You can’t delete branches from GitHub’s desktop apps, or from GitHub’s
hub terminal app. You can delete branches from git in Terminal, however, with the
git branch -d branch_name command (see StackOverflow for more details).