Skip to content

Instantly share code, notes, and snippets.

@sukhikh18
Created December 5, 2022 18:26
Show Gist options
  • Save sukhikh18/e339304b989d9b0d878c1b4f8177a433 to your computer and use it in GitHub Desktop.
Save sukhikh18/e339304b989d9b0d878c1b4f8177a433 to your computer and use it in GitHub Desktop.
git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment