Skip to content

Instantly share code, notes, and snippets.

@vikas-0
Created December 28, 2020 10:54
Show Gist options
  • Save vikas-0/0c885f61cb96b574cf962a10a5296547 to your computer and use it in GitHub Desktop.
Save vikas-0/0c885f61cb96b574cf962a10a5296547 to your computer and use it in GitHub Desktop.
Delete all branches which has been delete remotely
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment