Skip to content

Instantly share code, notes, and snippets.

@mormahr
Created August 1, 2020 20:37
Show Gist options
  • Save mormahr/ba66501d8f5a221765a4c4640c2cd570 to your computer and use it in GitHub Desktop.
Save mormahr/ba66501d8f5a221765a4c4640c2cd570 to your computer and use it in GitHub Desktop.
Git Prune
git fetch --prune
git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -d
@mormahr
Copy link
Author

mormahr commented Aug 1, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment