Skip to content

Instantly share code, notes, and snippets.

@thecodeholic
Created December 12, 2023 12:22
Show Gist options
  • Save thecodeholic/86b6d5943508d4aa3d5f29ed2e87927e to your computer and use it in GitHub Desktop.
Save thecodeholic/86b6d5943508d4aa3d5f29ed2e87927e to your computer and use it in GitHub Desktop.
Delete Git branches locally that are deleted on remote
git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment