2016/04/29

git 如何移除本地端中 remote 已不存在的 branch



常常我們合併了一個 branch 出去之後必須把該 branch 關掉

通常 git server 都可以在網頁上操作關閉該 branch

可是你的 local 並不會自動移除該 remote branch,所以你下 git remote -a 時就會有一堆你曾經 checkout 過的 branch

可以下
```
git remote prune "你要同步的 remote"
```
他就會把 remote 上不存在的分支從你的本地端移除囉

沒有留言:

張貼留言