Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spunkypanda/9f23b61adfddcb36b6118299e1306814 to your computer and use it in GitHub Desktop.
Save spunkypanda/9f23b61adfddcb36b6118299e1306814 to your computer and use it in GitHub Desktop.
Delete all Git local branches except dev, staging, master
git branch | grep -v "dev\|staging\|master" | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment