git delete all branches that are merged into current branch

git branch --merged | grep -v "*" | grep -v master | grep -v develop | xargs -n 1 git branch -d

References
https://gist.github.com/mizanRahman/3a7887a2eaac789677579959b1dc9f5c
http://stackoverflow.com/questions/6127328/how-can-i-delete-all-git-branches-which-have-been-merged

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *