Skip to content

Instantly share code, notes, and snippets.

@mohsinhijazee
Created April 26, 2018 07:29
Show Gist options
  • Save mohsinhijazee/7798fb3f6a857fa25068065fdd52cc19 to your computer and use it in GitHub Desktop.
Save mohsinhijazee/7798fb3f6a857fa25068065fdd52cc19 to your computer and use it in GitHub Desktop.
Deleting all branches other then current and master
# Delete every branch other then current and specified branches
git branch -D `git branch | grep -E '^[^\*]' | grep -Fv "master" | grep -Fv "develop"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment