Create a new Git branch

Azure Repos | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018-TFS 2017

Tip

Need help creating a new Git branch in your local repo from Visual Studio or the command line? Visit the Git tutorial.

Important

Users of TFS 2015 and previous won't have the Branches tab in the Code view. When using those versions, you can create a new branch in TFS from the Code view by selecting the dropdown list next to the branch name and then selecting New branch.

Create a new branch

  1. View your repo's branches by selecting Repos > Branches while viewing your repo on the web.

    View your branches

  2. Select New branch in the upper-right corner of the page.

    Create branch button

  3. In the Create a branch dialog box, enter a name for your new branch, select a branch to base the work off of, and associate any work items.

    Screenshot that shows the creation of a branch with the new branch dialog.

  4. Select Create branch.

  1. View your repo's branches by selecting Branches while viewing your repo on the web.

    Branches page

  2. Select New branch in the upper-right corner of the page.

    Create branch button

  3. In the Create a branch dialog box, enter a name for your new branch, select a branch to base the work off of, and associate any work items.

    Create a branch with the new branch dialog

  4. Select Create branch.

Tip

You will need to fetch the branch before you can see it and swap to it in your local repo.