Skip to content

Instantly share code, notes, and snippets.

@rubenarakelyan
Created February 20, 2026 15:25
Show Gist options
  • Select an option

  • Save rubenarakelyan/c212a75045f9f407c89c8a23c685fb48 to your computer and use it in GitHub Desktop.

Select an option

Save rubenarakelyan/c212a75045f9f407c89c8a23c685fb48 to your computer and use it in GitHub Desktop.
Delete all merged Git branches
git branch --merged origin/main | grep -vE "^\s*(\*|main|develop)" | xargs -n 1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment