Created
November 3, 2017 17:30
-
-
Save robatwilliams/ed25a263cb0868321b5b67277f181409 to your computer and use it in GitHub Desktop.
Delete old local Git branches
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
# manually | |
git remote update origin --prune | |
git branch -vv | grep "gone]" | |
git branch -d theBranchName anotherBranch andAnotherBranch | |
# automatically | |
git branch -vv | grep "gone]" | awk '{print $1}' | xargs git branch -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment