Remove obsolete branches from git

Look up on the remote which branches have been deleted there and remove them from local.

git remote update origin --prune
git branch -vvv | grep gone | cut -d' ' -f3 | xargs -I{} git branch -D '{}'

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.