删除仍然列在TortoiseGit中的远程分支 [英] Deleted remote branches still listed in TortoiseGit

查看:1503
本文介绍了删除仍然列在TortoiseGit中的远程分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到TortoiseGit似乎包含了我创建的每个功能分支,无论是在本地分支还是远程分支的下拉菜单中,即使许多远程分支在合并到主分区后都被删除。



在TortoiseGit中有什么方法可以同步哪些分支被列入实际存在的分支?



以及一个小的切线... Git本身是一个被认为完全与远程分离的分支的本地版本?即没有理由为什么删除远程版本应自动表示删除本地版本

>您可以这样做,如。



但是移除远程追踪分支与本地分支无关。


即没有理由为什么删除远程版本应该自动表示删除了本地版本?


当然:你错误地将' code> test '分支:




  • 要远程回购
  • >
  • ,但您非常希望将其保留在您的本地存储库中,以追求您无意推送的本地测试。


I have noticed TortoiseGit seems to contain every feature branch I ever created, both in drop-downs for local branches AND remote, even though many of the remote branches were deleted after being merged into master.

Is there a way in TortoiseGit to synhronise which branches are listed to those actually existing?

And a slight tangent... in terms of Git itself is a local version of a branch considered totally decoupled from the remote? i.e. there is no reason why deleting the remote version should automatically mean the local one is deleted?

解决方案

You can do, as mentioned in issue 1139, a Fetch with prune.
Or remove Remote Branch from list in Pull issue 2765.

That will clean-up any remote branches still locally referenced, while they are already deleted in the upstream repo.

in terms of Git itself is a local version of a branch considered totally decoupled from the remote?

It can be.
If a branch has an remote tracking branch associated to it, git branch -vv can show it.

But removing said remote tracking branch has no bearing on the local branch.

i.e. there is no reason why deleting the remote version should automatically mean the local one is deleted?

Sure: you pushed by mistake a 'test' branch:

  • you want to delete it on the remote repo
  • but you very much want to keep it on your local repo to pursue some local tests you have no intention of pushing.

这篇关于删除仍然列在TortoiseGit中的远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆