I’ve cloned a git repo using git clone --mirror, and I’d like to keep the mirror up to date. So far, I’ve been using git fetch --all, but I’ve noticed that branches deleted in the original repo are not deleted in the mirrored repo. I’ve looked at How to update a git clone --mirror? but my attempt at using git remote update didn’t appear to work – branches that were deleted in the original repo are still visible in the mirrored repo.
I’ve cloned a git repo using git clone –mirror , and I’d like to
Share
Use
git remote prune remoteNameto remove the remote branches.You can also add the
--prunetag togit remote update