Last active
April 17, 2023 06:06
-
-
Save istarkov/ec0afd7dc2f4ec59a65ac5ad50d77cc8 to your computer and use it in GitHub Desktop.
gitclean alias
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
# gitclean allows to work with multiple origins, cleans all deleteded aliases | |
alias gitclean="(git remote | xargs git remote prune) && git branch -vv | egrep '('\$(git remote | xargs | sed -e 's/ /|/g')')/.*: 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