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:

Branch selection dropdown

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:

Branch overview page

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:

  1. Create a new branch within your repository.
  2. Create or edit a file in your repository.
  3. 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.