Creating and deleting branches within your repository

Branch management is an important part of the Git workflow. You can manage 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: