Skip to content

Instantly share code, notes, and snippets.

@noofreuuuh
Created May 16, 2022 07:12
Show Gist options
  • Select an option

  • Save noofreuuuh/64d11e74df64ad889aa2dc3341534791 to your computer and use it in GitHub Desktop.

Select an option

Save noofreuuuh/64d11e74df64ad889aa2dc3341534791 to your computer and use it in GitHub Desktop.
Clean Local Git Branches That Were Removed On The Remote
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