how to delete all git local branches code example
Example 1: delete all local branches git
$ git branch | grep -v "master" | xargs git branch -D
Example 2: clean local branches git
git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d