Skip to content

Instantly share code, notes, and snippets.

@alegueleres
Created September 21, 2017 12:53
Show Gist options
  • Save alegueleres/cd844357d71fd85bf5460f4e8a0fda46 to your computer and use it in GitHub Desktop.
Save alegueleres/cd844357d71fd85bf5460f4e8a0fda46 to your computer and use it in GitHub Desktop.
git fetch origin --prune
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