複数ブランチを一括削除する Tips はあったが、
grep の引数に複数の値を渡すのどうやるんだっけとなり調べたのでメモ。
-e
オプションで書いてやるといいらしい
git branch | grep \
-e hoge_branch \
-e fuga_branch \
| xargs git branch -d ;
以下、grep のドキュメントから抜粋
Matching Control
-e PATTERNS, --regexp=PATTERNS
Use PATTERNS as the patterns. If this option is used
multiple times or is combined with the -f (--file) option,
search for all patterns given. This option can be used to
protect a pattern beginning with “-”.
参考にした記事: