删除 Git 分支

Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018

Visual Studio 2022 |Visual Studio 2019 |Visual Studio 2017 |Visual Studio 2015

本文介绍如何使用两种不同的方法删除 Git 分支:在 Visual Studio 和命令行中。

注意

删除本地存储库中的分支不会删除远程上的分支。

  1. 在 Web 上查看存储库时,通过选择 Repos>Branches 来查看存储库的分支。

    Screenshot that shows how to access your branches.

  2. 选择要删除的分支行末尾的 “更多 选项”按钮。

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

  3. 在选项菜单中,选择“ 删除分支”。

  4. “删除分支 ”对话框中,选择“ 删除”。

后续步骤