远端删除的分支 git branch -a 仍然能看见?
远程仓库里已经删除的分支,但是在本地git branch -a 的时候还是有?
git remote show origin
获取远端分支信息,你可以看到和本地和远端不同步的地方,然后执行下面命令
* 远程 origin 获取地址:http://openapi2.0.git 推送地址:http://openapi2.0.git HEAD分支:master 远程分支: beta 已跟踪 develop 已跟踪 master 已跟踪 refs/remotes/origin/communal 过时(使用 'git remote prune' 来移除) refs/remotes/origin/lt-v1 过时(使用 'git remote prune' 来移除) release/1.0 已跟踪 为 'git pull' 配置的本地分支: beta 与远程 beta 合并 develop 与远程 develop 合并 master 与远程 master 合并 为 'git push' 配置的本地引用: beta 推送至 beta (最新) develop 推送至 develop (本地已过时) master 推送至 master (本地已过时)
过时的就是和本地不同步的分支,本地已过时的表示你需要git pull这个分支了。
git remote prune origin
同步远程的分支到本地,这样远程已经被删除的分支,本地就不会再看见了。