You can add or remove branches directly on GitHub.
Creating a branch
You can create a new branch in a repository's branch selector menu. Just start typing the name of your branch; if it doesn't exist, GitHub will offer to create it for you:
Deleting a branch
Likewise, if you go to the Branches page on your repository, you have the option of deleting a branch, provided you have appropriate access to the repository, and that there isn’t an open pull request that depends on it:
How is this useful?
We recommend creating branches locally, on your computer. This makes it easier to track changes and collaborate with other people.
Online branch management is useful for simple cases, such as fixing typos or brainstorming an idea. Here's how it works:
- Create a new branch within your repository.
- Create or edit a file in your repository.
- Create a pull request so that other collaborators can review the changes in your branch.
For a more detailed approach, check out our article about GitHub Flow in the browser.