Skip to content

Instantly share code, notes, and snippets.

@vhorb
Last active August 8, 2019 14:16
Show Gist options
  • Select an option

  • Save vhorb/d0070f2c6da4c6c352df6e2995b8f5d6 to your computer and use it in GitHub Desktop.

Select an option

Save vhorb/d0070f2c6da4c6c352df6e2995b8f5d6 to your computer and use it in GitHub Desktop.
Delete local GIT branches that were deleted on remotly
git remote update origin --prune
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