Created
March 8, 2019 11:40
-
-
Save vilinski/ecddb1b895e1ed627190ca0e21f94da9 to your computer and use it in GitHub Desktop.
git cleanup
This file contains 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
[alias] | |
# view list of merged feature branches | |
lscleanup = "!git branch -r --merged | grep -e 'feature\\|component' | sed 's/origin\\///'" | |
# delete merged feature branches local and on origin | |
cleanup = "!git branch -r --merged | grep -e 'feature\\|component' | sed 's/origin\\///' | xargs -n 1 git push --delete origin" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment