Last active
April 6, 2020 01:42
-
-
Save leechunhoe/5697245ac3457fdf5df721f15c4594b2 to your computer and use it in GitHub Desktop.
Delete merged/gone local git branches (bash/zsh)
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
# Delete git branches with status [gone] (bash/zsh) | |
git branch -v | grep "\[gone\]" | awk 'END {FS="\t"}; {print $1}' | xargs git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment