Skip to content

Instantly share code, notes, and snippets.

@marcosrjjunior
Last active February 22, 2022 02:30
Show Gist options
  • Save marcosrjjunior/c41c83f32021a85967fdf17c99ec2e05 to your computer and use it in GitHub Desktop.
Save marcosrjjunior/c41c83f32021a85967fdf17c99ec2e05 to your computer and use it in GitHub Desktop.
Delete merged branchs
#!/usr/bin/env bash
# delete branchs that were merged to main|develop|.....
git branch --merged | egrep -v "(^\*|main|develop|release/1.0.0)" | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment