Skip to content

Instantly share code, notes, and snippets.

@alexbartsch
Last active September 6, 2018 08:45
Show Gist options
  • Save alexbartsch/c07921fcc8d5d9e592f0291b302bc37b to your computer and use it in GitHub Desktop.
Save alexbartsch/c07921fcc8d5d9e592f0291b302bc37b to your computer and use it in GitHub Desktop.
Delete old local branches
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
# for german cli use
git branch -vv | grep 'origin/.*: entfernt]' | 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