If you have branches containing master then this script won't delete those.
master
Instead you could use:
git branch | grep -ve " master$" | xargs git branch -D
This will remove branches named (e.g.) test-master, master-test.
test-master
master-test
If you have branches containing
master
then this script won't delete those.Instead you could use:
This will remove branches named (e.g.)
test-master
,master-test
.