Skip to content

Instantly share code, notes, and snippets.

@liaujianjie
Created August 28, 2020 08:06
Show Gist options
  • Save liaujianjie/f9f4d410a9b619332df11d37b4f81f60 to your computer and use it in GitHub Desktop.
Save liaujianjie/f9f4d410a9b619332df11d37b4f81f60 to your computer and use it in GitHub Desktop.
Prune branches on local and delete their local copy
g branch -D $(git remote prune origin | sed -e '1,2d' | sed -e 's/\ \* \[pruned\] origin\///' | paste -sd " " -)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment