Last active
May 16, 2024 21:17
-
-
Save arumals/6b389eca8d0f3d1748cfb1afff3d6198 to your computer and use it in GitHub Desktop.
Alias to clean merged git branches from command line
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
clean_branches() { | |
git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment