Slowly my local git repository had accumulated close to 50 branches. I felt like removing every other branch expect master .
master
git branch | grep -v master | xargs git branch -D