Skip to content

Instantly share code, notes, and snippets.

@estroz
Created September 13, 2019 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estroz/3ce066e9c0b190c728b00e215dad2aed to your computer and use it in GitHub Desktop.
Save estroz/3ce066e9c0b190c728b00e215dad2aed to your computer and use it in GitHub Desktop.
delete_old_branches.sh
git branch -vv | gawk '{print $1,$3,$4}' | grep -E '\[origin/.+: gone\]' | gawk '{print $1}' | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment