Created
July 21, 2020 11:00
-
-
Save mszkb/f1582e3eae3a8a1ae6fd6e2122825d0d to your computer and use it in GitHub Desktop.
gitclean: Remove all branches but the master branch + checkout master + pull + safety stash
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
| git stash && git checkout master && git pull && git branch | grep -v "master" | xargs git branch -D |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use a shell alias, for example 'gitclean' in bash, zsh or similar.