git clear local branch list code example
Example 1: git clear local branch list
$ git branch -r --merged | egrep -v "(^\*|master|dev)" | xargs -n 1 git push --delete origin
Example 2: git clean local branches
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d