2013-04-03 128 views
0
  1. git branch -a显示remotes/team/masterremotes/team/my-branch混帐:应对远程分支机构从删除远程

  2. git remote rm team说:"error: Could not remove config section 'remote.team'"(因为我编辑使用文本编辑器配置文件)。

由于team远程不见了,我该如何删除这些(本地)远程分支?

+0

参见http://stackoverflow.com/a/24984486/6309 – VonC 2014-07-27 19:02:17

回答

1

要删除远程跟踪分支:

git branch -rd team/master 

-r装置的遥控器。所以-rd意味着删除远程追踪分支。

要自动远程不具有再一个上游分支任何远程跟踪分支:

git remote prune 
+0

'GIT中远程剪枝team'失败因为找不到团队。 'git branch -rd team/master'很好。谢谢! – 2013-04-03 20:09:53

+0

'git branch -rd team/HEAD'不起作用。任何想法如何摆脱那一个? – 2013-04-03 20:12:49

+0

找到[answer](http://stackoverflow.com/a/6838756/23566):'git remote set-head team -d' – 2013-04-03 20:24:24