git branch | grep -v "master" | xargs git branch -D
// -- Clear all branches except Master Branch --
git branch -D $(git branch | grep -v 'master')
// This will clear all your branches you have on local that you have
// not pushed to your repository. eg: IF, you created a branch that was,
// not pushed it will remain along with amster.
// But the others will be cleaned.
// -- Delete a single branch
git branch -D branch-name
git branch | grep -v “master” | xargs git branch -D
git branch | grep -v "master" | grep -v ^* | xargs git branch -D
git branch | %{ $_.Trim() } | ?{ $_ -ne 'master' } | %{ git branch -D $_ }
git branch -r | grep 'origin' | grep -v 'master$' | grep -v HEAD | cut -d/ -f2- | while read line; do git push origin :heads/$line; done;
$ git branch | grep -v '^*' | xargs git branch -D