Skip to content

Instantly share code, notes, and snippets.

@hugoduraes
Last active April 6, 2020 11:52
Show Gist options
  • Save hugoduraes/bfda8a8fd544ee4ebc0ec19b0502d25f to your computer and use it in GitHub Desktop.
Save hugoduraes/bfda8a8fd544ee4ebc0ec19b0502d25f to your computer and use it in GitHub Desktop.

Delete local branches not on remote

git branch -vv | grep ': gone]' |  grep -v "\*" | 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