I'm not as tidy with my git branches as I could be. One way to clean up branches (described here) is:
git checkout master
git branch --merged # get those branches are merged
git branch -d $branch
But that only works for master. Is there an easy way to do this for all branches. One approach would be to loop over the branches, but that's starting to feel overcomplicated.