Created
May 5, 2021 12:13
-
-
Save whitep4nth3r/e6b10ef17636e29010d7a8b57800685e to your computer and use it in GitHub Desktop.
Delete all branches merged into main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add to your shell configuration to improve your life! | |
dam() { | |
git checkout main && git branch --merged | egrep -v "(^\*|main)" | xargs git branch -d | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment