I have created many branches in local and remote. I want delete all the branch from local as well as remote.
Note:I don't want delete each and every branches one by one.
Thanks
I have created many branches in local and remote. I want delete all the branch from local as well as remote.
Note:I don't want delete each and every branches one by one.
Thanks
You should make a copy of the repo, before doing this. So, that in case of any unwanted changes, you can recover easily.
You can run the following command from your repo root.
git branch --merged master | grep -v master | xargs git branch -d