Skip to content

Instantly share code, notes, and snippets.

@exaV
Created January 5, 2024 09:49
Show Gist options
  • Save exaV/a756da8dd1a5788973b6d73e286d0993 to your computer and use it in GitHub Desktop.
Save exaV/a756da8dd1a5788973b6d73e286d0993 to your computer and use it in GitHub Desktop.
cleanup git branches that have no remote
# git branch -vv (verbose) marks deleted branches with : gone
git branch -vv | rg gone | fzf -m --bind ctrl-a:select-all | awk '{print $1}' | xargs -I {} git branch -D '{}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment