0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitで幽霊ブランチが手元に残る件

Posted at

マージするときにブランチを削除してもgit branch -aで消したはずのブランチが表示されることがある。
この幽霊をローカルに適用するには以下のコマンドを叩く

$ git remote prune origin
備考
# branchの追跡状況を確認
$ git remote show origin
# → 「stale (use 'git remote prune' to remove)」は削除して良さそう

# fetch, pullするときにまとめて適用しちゃう
$ git pull/fetch --prune
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?