Skip to content

Instantly share code, notes, and snippets.

@evzpav
Created October 13, 2020 10:46
Show Gist options
  • Save evzpav/d3a18ada3caf5b097e4dfa50617e3354 to your computer and use it in GitHub Desktop.
Save evzpav/d3a18ada3caf5b097e4dfa50617e3354 to your computer and use it in GitHub Desktop.
Delete stale local branches
#!/bin/bash
# Delete all local branches that are no "master" neither "develop"
git branch -D `git branch | grep -vE 'master|develop'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment