Git Tip: Deleting merged branches locally
As a part of our spring cleaning drive in our remote repo, we found and deleted a lot of leftover merged branches.
I wanted to find a quick way to do the same locally, and I happened at an answer, which I've written down below, to save it as a quick ...
saiki.hashnode.dev1 min read
Chaim Lev-Ari
JS
this should also work:
git config --global alias.cleanup "!git branch --merged | grep -v '\\*\\|master\\|development|develop' | xargs -n 1 git branch -d"I also added develop branch because that what we mostly call it instead of development