Creating a branch for your work

If you have collaborator permissions on a repository, you can create a branch off of the repository's default branch so you can safely experiment with changes.

Creating a branch

Tip: The first new branch you create will be based on the default branch, which is usually master. If you have more than one branch, you will be given a choice to base the new branch on the currently checked out branch or the default branch.

  1. At the top of the app, switch to the branch that you want to base the new branch on by clicking the Current Branch and choosing it from the list.

    Drop-down menu to switch your current branch

  2. Click New Branch.

    New Branch option in the Branch menu

  3. Under Name, type the name of the new branch.

    Field for creating a name for the new branch

  4. Select either the current branch, or the default branch (usually master) to base the new branch on.

    Base branch options

  5. Click Create Branch.

    Create Branch button

  1. At the top of the app, switch to the branch that you want to base the new branch on by clicking the Current Branch and choosing it from the list.

    Drop-down menu to switch your current branch

  2. Click New Branch.

    New Branch option in the Branch menu

  3. Under Name, type the name of the new branch.

    Field for creating a name for the new branch

  4. Select either the current branch, or the default branch (usually master) to base the new branch on.

    Base branch options

  5. Click Create Branch.

    Create branch button

Further reading

Ask a human

Can't find what you're looking for?

Contact us