This is what git-cleanup does:
GIT_EDITOR). This makes it easy to determine whether the branch should be removed or not.
Every destructive operation is interactive - nothing unexpected will happen to your repo. It's perfectly fine to
Ctrl-C at any time if you get bored of deleting branches and want to do some real work.
Install the gem
$ gem install git-cleanup
Inside a git repo, just run git-cleanup
--skip-unmerged to ignore un-merged branches
$ git-cleanup --skip-unmerged
Be careful, if you delete a critical branch it's not my fault. Piping in
yes is a bad idea.