git fetch -p ; git branch -r | awk '{print $1}' | egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) | awk '{print $1}' | xargs git branch -D
Created
November 7, 2022 03:14
-
-
Save lawson-ng/227f2b5dfdafed20298c7b87a52fc17e to your computer and use it in GitHub Desktop.
Delete branches which do not existing in remote
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment