I want to delete all branches that get listed in the output of ...
$ git branch
... but keeping current branch, in one step. Is th
Delete all branches except a specific branch:
git branch | grep -v "branch name" | xargs git branch -D
Delete all local branches except develop and master
git branch | grep -v "develop" | grep -v "master" | xargs git branch -D