Skip to content

Instantly share code, notes, and snippets.

@bradyclifford
Created February 12, 2018 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradyclifford/7406ba3df6a6649c1e9c3d72b3dbc60d to your computer and use it in GitHub Desktop.
Save bradyclifford/7406ba3df6a6649c1e9c3d72b3dbc60d to your computer and use it in GitHub Desktop.
Removes all local branches of which are stale
git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment