How do I delete a Git branch with TortoiseGit

天大地大妈咪最大 提交于 2019-11-28 15:26:09
Sandro Munda

You should read this article: Remote branches with 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.

In the Browse refs dialog we can right click on the local branch and choose to delete it.

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.

Răzvan Flavius Panda

You can Shift + Right Click on the cloned repository and choose Browse References from TortoiseGit submenu:

Click on remotes in the left tree view, and then right click the branch you wish to remove and click on 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"

Open log dialog first, there are ways to delete branch(es):

  1. Right click on branch

  2. Right click on commit

  3. In Browse references dialog

  4. Delete merged branches

  5. Delete those remote-tracking branches which its remote branches are not exist on remote


    [Note] if you want to prune non-exist branches each time you perform fetch, you can do these:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!