LoginSignup
2
0

More than 5 years have passed since last update.

Gitのローカルブランチを削除して良い感じに整理したい

Last updated at Posted at 2019-02-17

一括でローカルブランチを削除したいときに便利

masterとdevelop以外を削除

git branch --merged | grep -vE '^\*|master$|develop$' | xargs -I % git branch -d %

特定の文字列を含むブランチを削除

git branch | grep <文字列> | xargs git branch -d
2
0
1

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
2
0