Skip to content

Instantly share code, notes, and snippets.

@ihordiachenko
Created August 24, 2018 12:36
Show Gist options
  • Save ihordiachenko/24822d880b63af9b2ba113c135b36d3d to your computer and use it in GitHub Desktop.
Save ihordiachenko/24822d880b63af9b2ba113c135b36d3d to your computer and use it in GitHub Desktop.
Prune unused git branches
git remote prune origin
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment