如下面命令,运行了 git remote prune origin
之后,本地依旧存在远程里已经删除了的分支
yu@MacBook-Pro-3 oms % git remote show origin
* remote origin
Fetch URL: http://git.demo.cn/yan/oms.git
Push URL: http://git.demo.cn/yan/oms.git
HEAD branch: master
Remote branches:
dev tracked
feature-v0.4.4.1 tracked
master tracked
test tracked
Local branches configured for 'git pull':
dev merges with remote dev
feature-v0.1 merges with remote feature-v0.1
feature-v0.2 merges with remote feature-v0.2
feature-v0.3 merges with remote feature-v0.3
feature-v0.4 merges with remote feature-v0.4
feature-v0.4.2 merges with remote feature-v0.4.2
feature-v0.4.3 merges with remote feature-v0.4.3
feature-v0.4.4 merges with remote feature-v0.4.4
master merges with remote master
test merges with remote test
Local refs configured for 'git push':
dev pushes to dev (up to date)
master pushes to master (up to date)
test pushes to test (up to date)
yu@MacBook-Pro-3 oms % git remote prune origin
yu@MacBook-Pro-3 oms % git remote show origin
* remote origin
Fetch URL: http://git.demo.cn/yan/oms.git
Push URL: http://git.demo.cn/yan/oms.git
HEAD branch: master
Remote branches:
dev tracked
feature-v0.4.4.1 tracked
master tracked
test tracked
Local branches configured for 'git pull':
dev merges with remote dev
feature-v0.1 merges with remote feature-v0.1
feature-v0.2 merges with remote feature-v0.2
feature-v0.3 merges with remote feature-v0.3
feature-v0.4 merges with remote feature-v0.4
feature-v0.4.2 merges with remote feature-v0.4.2
feature-v0.4.3 merges with remote feature-v0.4.3
feature-v0.4.4 merges with remote feature-v0.4.4
master merges with remote master
test merges with remote test
Local refs configured for 'git push':
dev pushes to dev (up to date)
master pushes to master (up to date)
test pushes to test (up to date)