Skip to content

Instantly share code, notes, and snippets.

@a10y
Created October 21, 2025 12:41
Show Gist options
  • Select an option

  • Save a10y/bf45358f02a2fd01075a3746533d4b1d to your computer and use it in GitHub Desktop.

Select an option

Save a10y/bf45358f02a2fd01075a3746533d4b1d to your computer and use it in GitHub Desktop.
# find all refs with remotes that are deleted on the server, and delete them locally
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