Skip to content

Instantly share code, notes, and snippets.

@suzumura-ss
Last active November 12, 2021 02:49
Show Gist options
  • Save suzumura-ss/65056eb0d22b62af0ed2d39baba1d230 to your computer and use it in GitHub Desktop.
Save suzumura-ss/65056eb0d22b62af0ed2d39baba1d230 to your computer and use it in GitHub Desktop.
remove git branches without remote branch
#!/bin/bash
git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
git branch -vv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment