タイトルの通りに、master
ブランチ意外全て削除するのは以下のコマンドです。
'master'
の代わりに他のブランチ名を変えることもできます。
ターミナル
git branch | grep -v 'master' | xargs git branch -D
長くて覚えづらいので、aliasを作成しました。
~/.zshrc
alias gbr="git branch | grep -v 'master' | xargs git branch -D"
Go to list of users who liked
More than 3 years have passed since last update.
タイトルの通りに、master
ブランチ意外全て削除するのは以下のコマンドです。
'master'
の代わりに他のブランチ名を変えることもできます。
git branch | grep -v 'master' | xargs git branch -D
長くて覚えづらいので、aliasを作成しました。
alias gbr="git branch | grep -v 'master' | xargs git branch -D"
Register as a new user and use Qiita more conveniently
Go to list of users who liked