“git branch -a”命令在远程仓库中仍显示已删除的远程分支?

6
我已经将整个本地分支上传(推送)到远程仓库。 我已经将其与主分支合并,并在远程仓库(github.com)中删除了该分支。 在终端上运行 git branch -a 命令仍会显示该分支。
$ git branch -a
* master
  remotes/hivauz/master
  remotes/hivauz/new_local_branch

“为什么,Github需要时间来更新它吗?”

3
可能是 [git remote branch deleted but still appears in 'branch -a'] 的重复问题。 - mkrieger1
1
此外,https://dev59.com/cloU5IYBdhLWcg3wO1QW#37664362 - msanford
可能是重复的问题,参考如何在本地和远程同时删除Git分支? - phd
1个回答

13

为了在本地环境中删除远程分支参考,您需要运行git fetch --all --prune命令。


1
嗯,它还在那里...奇怪。 - ERJAN
让我自我纠正一下,以防万一:git fetch --all --prune - eftshift0
它仍然在那里。 - SAIF AHMED ANIK

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接