I want to delete all branches that get listed in the output of ...
$ git branch
... but keeping current branch, in one step. Is th
IMHO, the safest way of removing local branches is:
git branch -av | grep "\[gone\]" | awk '{print $1}' | xargs git branch -d
Also, more info related to this topic you can find Delete all local git branches