Skip to content

Instantly share code, notes, and snippets.

@matagus
Forked from anonymous/delete-local-branches
Created December 13, 2012 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save matagus/4276760 to your computer and use it in GitHub Desktop.
Save matagus/4276760 to your computer and use it in GitHub Desktop.
git branch --merged origin/master | grep -v '\* master' | xargs -l1 git branch -d
git branch -r --merged origin/master | grep 'matagus/.*' | cut -d / -f 2 | grep -v 'master' | xargs -l1 -I {} git push matagus :{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment