# Remove Tracking Branches No Longer On Remote

$ git branch -a
* main
  remotes/origin/articles-main
  remotes/origin/gh-pages
  remotes/origin/main

# remote branch articles-main, gh-pages has been deleted
$ git remote prune origin
Pruning origin
URL: [email protected]:tianheg/wiki.git
 * [pruned] origin/articles-main
 * [pruned] origin/gh-pages
1
2
3
4
5
6
7
8
9
10
11
12