Skip to content

Instantly share code, notes, and snippets.

@billmoritz
Created January 16, 2013 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billmoritz/4547198 to your computer and use it in GitHub Desktop.
Save billmoritz/4547198 to your computer and use it in GitHub Desktop.
Deletes remote branches from origin that have been merged in to origin/master
git branch -r --merged origin/master |
grep origin | egrep -v '>|master' |
awk '{sub(/origin\//,"");print}' |
xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment