Created
April 5, 2023 02:30
-
-
Save y16ra/081b33f928dc7483fa249d47f1a50f35 to your computer and use it in GitHub Desktop.
Delete all branches that do not exist in the remote branch
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
[alias] | |
clean-branch = !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
Usage
git clean-branch