Skip to content

Instantly share code, notes, and snippets.

@drkmullins
Created March 13, 2017 17: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 drkmullins/64dcc81d83128cd23c1699b6e46cbcc2 to your computer and use it in GitHub Desktop.
Save drkmullins/64dcc81d83128cd23c1699b6e46cbcc2 to your computer and use it in GitHub Desktop.
Deletes local branches that no longer exist on the remote
git fetch -p && git branch -vv | gawk "/: gone]/{print $1}" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment