Remove local merged branches

To remove merged local branches:

bash: git branch -d $(git branch --merged)
windows cmdr: git branch --merged | grep -v '^* master$' | grep -v '^  master$' | xargs git branch -d

and in case you want to remove inexistent trackings too:

git pull --prune

Leave a Reply