How can I keep a git mirror in sync (including deleting branches)?

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.


Use git remote prune remoteName to remove the remote branches.

You can also add the --prune tag to git remote update


 ? How to unlock windows programmatically
 ? How many partitions should we use in Redis? As the data become larger, how can i rearrange the partition?
 ? Gitlab, Permission denied (publickey), version 6-4 stable
 ? Gitlab returning remote: You do not have permissions to do this. while performing scripted git push
 ? Mirroring from Gitlab to Github
 ? Permission denied (publickey) on capifony deployment from windows with remote host gitlab
 ? Unable to connect to Gitlab Container on Custom Port via SSH
 ? Centos 6.8 - Updates repo issues
 ? Centos 6.8 - Updates repo issues
 ? Centos 6.8 - Updates repo issues