とある開発で、gitのリモートブランチ確認したら
$ git branch -a
* master
remotes/origin/HEAD -> origin/master
remotes/origin/change-db-seed
remotes/origin/change-db-seed-activerecord
remotes/origin/change-header-login-link
remotes/origin/change-sidebar-cart
remotes/origin/change-top-image
remotes/origin/change_ruby_version
remotes/origin/dev
remotes/origin/hide-unused-menu
remotes/origin/install_paypal
remotes/origin/master
remotes/origin/set-google-analytics
remotes/origin/upload-image-to-amazaon-s3
remotes/origin/webmastertool
とたくさん出てきた
ブラウザでリポジトリ見てみるとそんなにない
ブラウザでブランチ消したりしても、自動で手元も消してくれないわけで
$ git fetch origin –prune
(originは環境に合わせて)
From sample.com:sample/sample
x [deleted] (none) -> origin/change-db-seed
x [deleted] (none) -> origin/change-db-seed-activerecord
x [deleted] (none) -> origin/change-header-login-link
x [deleted] (none) -> origin/change-sidebar-cart
x [deleted] (none) -> origin/change-top-image
x [deleted] (none) -> origin/change_ruby_version
x [deleted] (none) -> origin/dev
x [deleted] (none) -> origin/hide-unused-menu
x [deleted] (none) -> origin/install_paypal
x [deleted] (none) -> origin/set-google-analytics
x [deleted] (none) -> origin/webmastertool
と消されたリモートブランチが手元で表示されなくて、すっきりしました
pruneは〔不要なもの・余分なものを〕取り除く、削るという意味があるようです
参照: pruneの意味・用例|英辞郎 on the WEB:アルク