git cleanup merged branches code example
Example 1: git delete merged branches
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
Example 2: git prune local branches
npx git-removed-branches --prune
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d
npx git-removed-branches --prune