Supprimer toutes les succursales locales Git
git branch --merged | grep -v \* | xargs git branch -D
Joyous Jay
git branch --merged | grep -v \* | xargs git branch -D
git branch | grep -v "master" | xargs git branch -D
$ git branch | grep -v '^*' | xargs git branch -D
git branch | grep -v "main" | xargs git branch -D
git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D
git branch | grep -v "develop" | grep -v "master" | xargs git branch -D