I have many Git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?
Just extending Adam's answer a little bit:
Add this to your Git configuration by running git config -e --global
git config -e --global
[alias] cleanup = "!git branch --merged | grep -v '\\*\\|master\\|develop' | xargs -n 1 git branch -d"
And then you can delete all the local merged branches doing a simple git cleanup.
git cleanup