如何保持git镜像同步(包括删除分支)?

ncd*_*cdc 6 git synchronization mirror

我用克隆了一个git repo git clone --mirror,我想让镜子保持最新状态.到目前为止,我一直在使用git fetch --all,但我注意到在原始仓库中删除的分支不会在镜像仓库中删除.我看过如何更新git clone --mirror但我尝试使用git remote update似乎不起作用 - 在原始仓库中删除的分支仍然在镜像仓库中可见.

And*_*ndy 9

使用git remote prune remoteName删除远程分支机构.

您还可以添加--prune标签git remote update