如果我跑

$ git branch -a

我明白了
* develop
  remotes/composer/compliance
  remotes/composer/develop
  remotes/composer/master
  remotes/origin/HEAD -> origin/develop
  remotes/origin/compliance
  remotes/origin/develop
  remotes/origin/master

如何删除所有remotes/composer
我只想留下
  remotes/origin/HEAD -> origin/develop
  remotes/origin/compliance
  remotes/origin/develop
  remotes/origin/master

最佳答案

如果要删除第二个远程(但看不到其分支),请执行以下操作:

git remote rm composer

这不会“删除”任何内容,但您将不再看到远程“composer”上的所有分支

08-27 17:48