Last active
July 21, 2023 19:20
-
-
Save mxdvl/5bc05c6ffacedadc9f54aa4b3221b511 to your computer and use it in GitHub Desktop.
Useful CLI commands
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
function git_remove_gone_branches() { | |
# from https://stackoverflow.com/a/61935602/1577447, except works with squash & merge strategy. | |
git fetch -p | |
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
Now moved to
mxvdvl/env/git.zsh