Sdílet prostřednictvím


Delete a Git branch

TFS 2018

Visual Studio 2019 | Visual Studio 2022

This article describes how to delete a Git branch by using two different methods: in Visual Studio and from the command line.

Note

Deleting a branch in your local repo doesn't remove the branch on the remote.

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

    Screenshot that shows how to access your branches.

  2. Select the More options button at the end of the row of the branch you want to delete.

    Screenshot that shows how to access the menu to delete a branch.

  3. In the options menu, select Delete branch.

  4. In the Delete branch dialog box, select Delete.

Next Steps