# Add this to your alias in .bashrc or .zshrc
# then run git-removed-merged-branches
alias git-removed-merged-branches="git branch --merged | egrep -v '(^*|master|dev)' | xargs git branch -d"
git branch --merged master | grep -v '^[ *]*master$' | xargs git branch -d