delete all remote branches in local git code example
Example 1: delete all local branches git
$ git branch | grep -v "master" | xargs git branch -D
Example 2: git branch delete all local branches
// hard delete
git branch -D $(git branch)
$ git branch | grep -v "master" | xargs git branch -D
// hard delete
git branch -D $(git branch)