$ git branch | grep -v "master" | xargs git branch -D
git branch --merged | grep -v * | xargs git branch -D
git branch | grep -v "master" | grep -v ^* | xargs git branch -D
// hard delete
git branch -D $(git branch)
git branch | grep -v "main" | xargs git branch -D
git branch | grep -v "develop" | grep -v "master" | xargs git branch -D
git branch --list 'o*' | xargs -r git branch -d
git branch --all-branches --merged --delete --ignore="fix-this-bug,prefix-*"
git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D