Skip to content

Instantly share code, notes, and snippets.

@qpfiffer
Created June 5, 2014 03:17
Show Gist options
  • Save qpfiffer/fce60e423331127abca4 to your computer and use it in GitHub Desktop.
Save qpfiffer/fce60e423331127abca4 to your computer and use it in GitHub Desktop.
Cleans out branches on origin that have been merged in.
for i in $(git branch -a --merged | grep -v master | sed 's/remotes\/origin\///g'); do git push origin :$i && git branch -d $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment