Skip to content

Instantly share code, notes, and snippets.

@benash
Created May 11, 2012 21:04
Show Gist options
  • Save benash/2662405 to your computer and use it in GitHub Desktop.
Save benash/2662405 to your computer and use it in GitHub Desktop.
Remove all git branches not containing 'master'
git branch -r | grep -v master | awk -F / '{print $2}' | tr '\n' ' ' | xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment