Skip to content

Instantly share code, notes, and snippets.

@accidentallyc
Last active November 18, 2020 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save accidentallyc/4d59b914d33c4fba54e91f746bf38fda to your computer and use it in GitHub Desktop.
Save accidentallyc/4d59b914d33c4fba54e91f746bf38fda to your computer and use it in GitHub Desktop.
Git Remove Local Branches without remotes spell
# For squashed merged commits (with remotes deleted)
git branch -vv | grep ": gone]" | grep -v "*" | 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