0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

マージしたブランチを全部消す方法

Posted at
  1. チェックする先のブランチをチェックアウト (例: master)
  2. git branch --list | cut -c3- | xargs git -c advice.forceDeleteBranch false branch -d
  3. masterにマージしたブランチが全て消える

-c advice.forceDeleteBranch falseをつけるのは、つけないと以下のような警告が出てうるさいため:

error: the branch 'example' is not fully merged
hint: If you are sure you want to delete it, run 'git branch -D example'
hint: Disable this message with "git config advice.forceDeleteBranch false"
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?