Last active
August 12, 2019 21:24
-
-
Save uxder/64ecfab0421ee6a0aeb2156739d38c31 to your computer and use it in GitHub Desktop.
Git Commands
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
# Delete all branches that contain 'search_keyword' | |
git branch | grep 'search_keyword' | xargs git branch -D | |
# Delete all branches that have already merged into master or staging | |
git branch --merged | egrep -v "(^\*|master|staging)" | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment