blog
blog copied to clipboard
清除所有远程冗余分支
当我们在终端执行 git ck 'branch' 的时候经常会补全一些很久没有用过的分支出来
如图:
我们怎么清除这些本地已经删除,但是远程还存在的冗余分支呢。
git remote show origin
先查看所有分支情况
有两个关键提示 tracked 跟踪,追踪(track的过去式) stale 陈腐的;不新鲜的
后面跟了一个提示信息 use 'git remote prune' to remove
执行
git remote prune origin