DRYな備忘録

Don't Repeat Yourself.

tracking branch(追跡ブランチ)の削除【git】

問題

git push ORIGIN-NAME :BRANCH-NAME でリモートは消せるけど、どうやらローカルにあるtrackingは残ってるようだ。これ消したい。

解決

git branch -r -d ORIGIN-NAME/BRANCH-NAME

[16:58:13] % git branch -a
* develop
  feature/upload-local-file
  master
  refactor
  remotes/about518/develop
  remotes/about518/feature-judge-chrome-version
  remotes/about518/feature/achievement-record
  remotes/about518/feature/play-sound-at-alert
  remotes/about518/feature/upload-local-file
  remotes/about518/master
  remotes/about518/refactor
  remotes/origin/HEAD -> origin/master
  remotes/origin/develop
  remotes/origin/feature-judge-chrome-version
  remotes/origin/feature/1_min_before
  remotes/origin/feature/achievement-record
  remotes/origin/feature/alert_on_payment
  remotes/origin/feature/badge-left-time
  remotes/origin/feature/change-fist-title
  remotes/origin/feature/change-notification-img
  remotes/origin/feature/clear-badge-on-widget-focused
  remotes/origin/feature/creattion-notification
  remotes/origin/feature/fix-bugs
  remotes/origin/feature/input-tracking
  remotes/origin/feature/log-achivevment-of-kousyou
  remotes/origin/feature/notification-nyukyo
  remotes/origin/feature/options-page
  remotes/origin/feature/rich-config-view
  remotes/origin/feature/show-time-left-in-popup
  remotes/origin/feature/testem
  remotes/origin/fix-bug/payment-api
  remotes/origin/master
  remotes/origin/refactor
  remotes/zep/develop
  remotes/zep/feature-local-storage
  remotes/zep/feature-notification
  remotes/zep/master
[16:59:31] % git branch -r -d origin/feature/1_min_before
Deleted remote branch origin/feature/1_min_before (was 691026f).