Skip to content

Instantly share code, notes, and snippets.

@wayne-weibel
Created September 28, 2018 13:07
Show Gist options
  • Save wayne-weibel/46c862981b9a558d107a4e4fdffc34a1 to your computer and use it in GitHub Desktop.
Save wayne-weibel/46c862981b9a558d107a4e4fdffc34a1 to your computer and use it in GitHub Desktop.
bash delete local branches except matching
git branch --list | grep -vP 'master|develop' | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment