Skip to content

Instantly share code, notes, and snippets.

@Fer0x
Created June 20, 2018 15:43
Show Gist options
  • Save Fer0x/0a1bb4f662359a245c8732a4bdd9087d to your computer and use it in GitHub Desktop.
Save Fer0x/0a1bb4f662359a245c8732a4bdd9087d to your computer and use it in GitHub Desktop.
git remote prune origin
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | 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