Skip to content

Instantly share code, notes, and snippets.

@kingingcole
Created October 5, 2024 14:21
Show Gist options
  • Save kingingcole/28d7b39e538f36e6630e425bc7af8cac to your computer and use it in GitHub Desktop.
Save kingingcole/28d7b39e538f36e6630e425bc7af8cac to your computer and use it in GitHub Desktop.
Terminal command to delete all merged local branches
git branch --merged | grep -v "^\*\\|main" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment