git branch | grep -v "master\|testing\|staging" | xargs git branch -D
more information: https://coderwall.com/p/x3jmig/remove-all-your-local-git-branches-but-keep-master
git branch | grep -v "master\|testing\|staging" | xargs git branch -D
more information: https://coderwall.com/p/x3jmig/remove-all-your-local-git-branches-but-keep-master