Last active
May 23, 2022 08:31
-
-
Save emrahyumuk/16e5a534febe4ab75f3c5b9d661ff44e to your computer and use it in GitHub Desktop.
Delete local branches not on remote
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
git remote prune origin | |
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment