Skip to content

Instantly share code, notes, and snippets.

Forked from schacon/gist:942899
Created April 26, 2011 19:52
What would you like to do?
delete all remote branches that have already been merged into master
$ git branch -r --merged |
sed '/>|master/d;/origin/!d;s:origin/::' |
xargs git push origin --delete
# I think this will work, but I don't know how to get git branch to show me that -> line
Copy link

Guessing is the place to go now. Pretty sure I made this gist before SO existed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment