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?

More than 1 year has passed since last update.

gitで任意のローカルブランチを複数削除する方法

Last updated at Posted at 2022-01-05

意外とこういう脳筋記事が見つからなかったので、、、
これが最適かどうかは分かりませんが、grepやxargsを使わなくても単純に"空白"で繋げるだけで任意のローカルブランチを複数削除できます。

git branch -D [ブランチ名][空白][ブランチ名][空白][ブランチ名]・・・・
例) git branch -D develop1 develop2 develop3

結果) 
 Deleted branch develop1 (was XXXXXXX)
 Deleted branch develop2 (was XXXXXXX)
 Deleted branch develop3 (was XXXXXXX)
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?