如何使用 TortoiseGit 删除 Git 分支
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9705534/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How do I delete a Git branch with TortoiseGit
提问by Tarion
Is there an option to delete a branch with TortoiseGit?
是否可以选择使用TortoiseGit删除分支?
I found a solution for the commandline. Is there an implementation in TortoiseGit?
回答by Sandro Munda
You should read this article: Remote branches with TortoiseGit
您应该阅读这篇文章:使用 TortoiseGit 进行远程分支
According to this blog post:
根据这篇博文:
...remove the local branch by first opening up the Checkout/Switch
dialog to get at the Browse refs
dialog.
...通过首先打开Checkout/Switch
对话框以获取对话框来删除本地分支Browse refs
。
In the Browse refs
dialog we can right click on the local branch and choose to delete it.
在Browse refs
对话框中,我们可以右键单击本地分支并选择将其删除。
To delete a remote branch we can do the same thing, but instead of right clicking on our local branch we expand the remotes tree in the left part of the dialog and then locate the remote branch.
要删除远程分支,我们可以做同样的事情,但不是右键单击本地分支,而是展开对话框左侧的远程树,然后找到远程分支。
回答by R?zvan Flavius Panda
You can Shift+ Right Click on the cloned repository and choose Browse References
from TortoiseGit submenu:
您可以Shift+ 右键单击克隆的存储库并Browse References
从 TortoiseGit 子菜单中选择:
Click on remotes in the left tree view, and then right click the branch you wish to remove and click on Delete remote branch
.
单击左侧树视图中的遥控器,然后右键单击要删除的分支并单击Delete remote branch
。
You can also get rid of the "shift"+right click: Go to TortoiseGit settings -> "Set extended context menu" and uncheck "Browse References"
您还可以摆脱“shift”+右键单击:转到 TortoiseGit 设置->“设置扩展上下文菜单”并取消选中“浏览参考”