Last active
March 19, 2022 15:14
-
-
Save brunorsch/e74c3793ce95cd0b2e0ad12112f0fb7a to your computer and use it in GitHub Desktop.
Delete all local Git branches, except develop and the current one
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
# You can change from develop to whatever you want to keep | |
git branch | grep -v "develop\|$(git rev-parse --abbrev-ref HEAD)" | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment