Skip to content

Instantly share code, notes, and snippets.

@gusfune
Created July 15, 2020 17:08
Show Gist options
  • Save gusfune/21832e014c2e5b316e156a6dcc688c0e to your computer and use it in GitHub Desktop.
Save gusfune/21832e014c2e5b316e156a6dcc688c0e to your computer and use it in GitHub Desktop.
Clean up all stable branches locally that have been removed from remote branch
git fetch -p && git branch -vv | grep 'origin/.*: gone]' | 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