Skip to content

Instantly share code, notes, and snippets.

@aguilarcarlos
Created November 12, 2021 21:41
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 aguilarcarlos/af67b4c5f52063a77e59e3093a5c08eb to your computer and use it in GitHub Desktop.
Save aguilarcarlos/af67b4c5f52063a77e59e3093a5c08eb to your computer and use it in GitHub Desktop.
clean_branches
clean_branches() {
git remote prune origin
git branch -vv | grep "origin/.*: gone]" | 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