I want to delete all branches that get listed in the output of ...
$ git branch
... but keeping current branch, in one step. Is th
To remove all merged branches(except current -v ‘*’
):
git branch --merged | grep -v '*' | xargs git branch -D
also I made such command for repo complete clean up:
alias git-clean="git branch | grep -v '*' | grep -v 'master' | xargs git branch -D && git reset --hard && git clean -d -x -f"
taken from here.