Skip to content

Instantly share code, notes, and snippets.

@tsevdos
Created June 30, 2020 11:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsevdos/89cb05623d4a33b68a3ff3af1b1c9234 to your computer and use it in GitHub Desktop.
Save tsevdos/89cb05623d4a33b68a3ff3af1b1c9234 to your computer and use it in GitHub Desktop.
Git / Github
// remove all local branches except from the ones that exist in remote
git fetch --all -p; git branch -vv | grep ": gone]" | awk '{ print $1 }' | xargs -n 1 git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment