Skip to content

Instantly share code, notes, and snippets.

@dombesz
Created September 28, 2020 14:45
Show Gist options
  • Save dombesz/0ca13dcd7a9d5a5aefaf12acf3750f37 to your computer and use it in GitHub Desktop.
Save dombesz/0ca13dcd7a9d5a5aefaf12acf3750f37 to your computer and use it in GitHub Desktop.
Remove all local feature branches that have been deleted from the remote source.
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