blog icon indicating copy to clipboard operation
blog copied to clipboard

清除所有远程冗余分支

Open wuweijia opened this issue 5 years ago • 0 comments

当我们在终端执行 git ck 'branch' 的时候经常会补全一些很久没有用过的分支出来 如图: image 我们怎么清除这些本地已经删除,但是远程还存在的冗余分支呢。 git remote show origin 先查看所有分支情况

image

有两个关键提示 tracked 跟踪,追踪(track的过去式) stale 陈腐的;不新鲜的 后面跟了一个提示信息 use 'git remote prune' to remove

执行

git remote prune origin

wuweijia avatar Sep 10 '19 05:09 wuweijia