Skip to content

Instantly share code, notes, and snippets.

@ThiagoBfim
Created December 21, 2023 09:51
Show Gist options
  • Save ThiagoBfim/c0ec2b5d6c77a4c7ad25c09e8d7b46c3 to your computer and use it in GitHub Desktop.
Save ThiagoBfim/c0ec2b5d6c77a4c7ad25c09e8d7b46c3 to your computer and use it in GitHub Desktop.
Delete local GIT branches that were deleted on remote repository
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