Skip to content

Instantly share code, notes, and snippets.

@rogerwalt
Last active October 3, 2018 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rogerwalt/284daf57f9578646d9646580d2a41e66 to your computer and use it in GitHub Desktop.
Save rogerwalt/284daf57f9578646d9646580d2a41e66 to your computer and use it in GitHub Desktop.
Cleans stale git branches (removed on remote and merged local branches)
git remote prune origin
git branch --merged | egrep -v "(^\*|master|dev)" | xargs -r git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment