Skip to content

Instantly share code, notes, and snippets.

@cpjolicoeur
Created August 24, 2011 19:36
Show Gist options
  • Save cpjolicoeur/1168977 to your computer and use it in GitHub Desktop.
Save cpjolicoeur/1168977 to your computer and use it in GitHub Desktop.
delete remote git branches that have already been merged into master
for x in `git branch -r --merged origin/master | sed -l -e 's/ origin\///' | grep -e '[^production|staging|master|beta]'`; do git push origin :$x; done
@cpjolicoeur
Copy link
Author

strips out master, production, beta, staging branches

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