Skip to content

Instantly share code, notes, and snippets.

@harley
Created July 29, 2015 07:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harley/b3d55b8b622b8fd7ba1c to your computer and use it in GitHub Desktop.
Save harley/b3d55b8b622b8fd7ba1c to your computer and use it in GitHub Desktop.
remove merged branches on remote origin, handling feature/blah branches
git branch -r --merged | grep -vw "master" | grep -vw "HEAD" | grep -vw "develop" | cut -d "/" -f2 -f3| xargs -p -I {} git push origin :{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment