Skip to content

Instantly share code, notes, and snippets.

@jchavarri
Created June 21, 2017 22:19
Show Gist options
  • Save jchavarri/982653b1ead1a06c31e4a93323e5b526 to your computer and use it in GitHub Desktop.
Save jchavarri/982653b1ead1a06c31e4a93323e5b526 to your computer and use it in GitHub Desktop.
Prune local branches no longer on remote
git fetch -p && git branch -vv | awk '/: 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