Delete all local branches in GIT

git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D