Skip to content

Instantly share code, notes, and snippets.

@paultyng
paultyng / gist:2830129
Created May 29, 2012 19:18 — forked from kylefritz/gist:2563866
Delete branches that have been merged into HEAD
#all local branches that are merged into HEAD
git branch -d `git branch --merged | grep -v '^*' | tr -d '\n'`
#Delete all remote branches that are merged into HEAD
#jump back to master
git co master
#get rid of all local branches not on origin