How can I delete all Git branches which have been merged?
How can I delete all Git branches which have been merged? 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? git branch -D deletes branches that have NOT been merged! Use with care! – Dan Solovay Dec 23 '16 at 14:05 To be slightly more specific git branch -D deletes any branch whether it as been merged or not. – PhilT Feb 8 '17 at 9:48 git branch -D You can also do this directly from GitHub, if you go to the 'branches' section of your repo (e.g. github.com/<username>/<repo_name>/branches). There should be a list of all your branche...