Skip to content

Instantly share code, notes, and snippets.

@jessesquires
Created January 10, 2018 00:40
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save jessesquires/8781c86206dfb70e78eb7f1aa4fc6fac to your computer and use it in GitHub Desktop.
Save jessesquires/8781c86206dfb70e78eb7f1aa4fc6fac to your computer and use it in GitHub Desktop.
Delete all local git branches
git config --global alias.trim '!f() { git branch | grep -v "\*" | xargs -n 1 git branch -D; }; f'
@jessesquires
Copy link
Author

usage:

$ git trim

@jessesquires
Copy link
Author

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