【发布时间】:2017-08-20 20:56:45
【问题描述】:
我添加了一个遥控器,所以我可以检查同事的代码。
$ git remote add coworker git@ourgitserver.local:...
$ git fetch coworker
$ git checkout coworker/theirbranch
$ git checkout -b mycopy
代码看起来不错。所以我做了一些清理工作:
$ git checkout master
$ git remote remove coworker
$ git branch -D mycopy
但他们的远程分支仍然出现:
$ git branch -a
remotes/coworker/theirbranch
我已经完成了git fetch -p --all、git gc --prune=now,但它们什么也没做。
我不能git branch -D coworker/theirbranch 因为遥控器不存在。我也不能git fetch -p coworker,因为那个遥控器不存在。
有什么想法吗?
【问题讨论】:
-
为什么在清理树枝之前拆掉了遥控器?
-
我认为这无关紧要。您不认为通过删除远程,对远程分支的引用会消失吗?
标签: git git-branch git-remote