Skip to content

Instantly share code, notes, and snippets.

@Ribeiro-Tiago
Last active May 27, 2021 07:44
Show Gist options
  • Save Ribeiro-Tiago/3b975fe411f4cf0d18d27d93b5eeefa4 to your computer and use it in GitHub Desktop.
Save Ribeiro-Tiago/3b975fe411f4cf0d18d27d93b5eeefa4 to your computer and use it in GitHub Desktop.
prune git branches
// remote prune
git remote prune origin
// local prune
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