Created
November 29, 2018 15:54
-
-
Save moiseshilario/d272d690c14a889908ee82891fd54a78 to your computer and use it in GitHub Desktop.
Delete local branches (git)
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
# Delete branches that are already merged (but master/development/stage) | |
git branch --merged | egrep -v "(^\*|master|development|stage)" | xargs git branch -d | |
# Delete all local branches (but master/development/stage) | |
git branch | egrep -v "(^\*|master|development|stage)" | xargs git branch -D |
fabricionaweb
commented
Nov 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment