Skip to content

Instantly share code, notes, and snippets.

@naush
Last active September 29, 2023 16:36
Show Gist options
  • Save naush/692c9f41cf7b661b35099285fa3d83f1 to your computer and use it in GitHub Desktop.
Save naush/692c9f41cf7b661b35099285fa3d83f1 to your computer and use it in GitHub Desktop.
One liner for deleting merged git 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