Skip to content

Instantly share code, notes, and snippets.

@willmorgan
Last active October 16, 2018 11:47
Show Gist options
  • Save willmorgan/98a67c802156169982cb6e1866bf24a1 to your computer and use it in GitHub Desktop.
Save willmorgan/98a67c802156169982cb6e1866bf24a1 to your computer and use it in GitHub Desktop.
Delete Git branches that are gone
git branch -v | grep "\[gone\]" | grep -Eo "^ ([A-z0-9_./-]+)" | sed -E 's/^ //g' | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment