Skip to content

Instantly share code, notes, and snippets.

@jetsuit
Created April 5, 2018 10:43
Show Gist options
  • Save jetsuit/5b710d2b8af2e600c3387b7833cc657f to your computer and use it in GitHub Desktop.
Save jetsuit/5b710d2b8af2e600c3387b7833cc657f to your computer and use it in GitHub Desktop.
Delete all local branches, merged already (exclude staging, master, dev)
git branch --merged | grep -v "\*" | grep -v "staging|master|dev" | xargs -n 1 git branch -d
@jetsuit
Copy link
Author

jetsuit commented Dec 2, 2020

git branch | grep -v "master|dev|staging" | xargs git branch -D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment