Skip to content

Instantly share code, notes, and snippets.

@yoojene
Last active November 3, 2022 14:32
Show Gist options
  • Save yoojene/7fe5eea6f72bc651de50c38d0e09e386 to your computer and use it in GitHub Desktop.
Save yoojene/7fe5eea6f72bc651de50c38d0e09e386 to your computer and use it in GitHub Desktop.
Prune remote git branches then delete local tracking equivalents
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment