How to delete mutiple branches with one command in git?

Lets learn how to delete mul­ti­ple branches in git.

> git branch
release/7.0.0
release/8.0.0
release/9.0.0
release/10.0.0

If you want to delete all those branches with one com­mand you can do the following :

git branch -D `git branch | grep -E 'release/*'`

You may also like...

Leave a Reply

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