Skip to content

Instantly share code, notes, and snippets.

@alexmx
Created June 19, 2019 16:47
Show Gist options
  • Save alexmx/4aa3ae5e0f0d85cba270b366a8e20135 to your computer and use it in GitHub Desktop.
Save alexmx/4aa3ae5e0f0d85cba270b366a8e20135 to your computer and use it in GitHub Desktop.
Remove stale git local 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