Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ClaudioVarandas/5a4a0b7dc701e00fc84509868306e1df to your computer and use it in GitHub Desktop.
Save ClaudioVarandas/5a4a0b7dc701e00fc84509868306e1df to your computer and use it in GitHub Desktop.
prune_delete_branches.sh
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
git fetch --prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment