1
我们使用git的镜像功能将OSS存储库镜像到github上的我们自己的git镜像中。然后我们标记我们在我们的私人镜像中部署的修订版,以便我们可以将源与版本关联起来。不幸的是,当镜像同步运行时,它会删除源镜像中不存在的目标镜像b/c中的标记。有什么方法可以在目标回购上镜像和保留标签吗?在git镜像期间在目标存储库中保留标记
以下是我们在同步脚本中进行同步的方式。
git clone --mirror https://github.com/usergrid/usergrid.git usergrid_mirror
cd usergrid_mirror
git remote set-url --push origin https://github.com/mycompany/usergrid.git
git push --mirror
当我执行 “推--mirror” 我的标签在myCompany中/ usergrid.git被删除。
感谢, 托德
你可以在'cd usergrid_mirror'之后执行'git tag'吗?如果有输出(标签),请尝试使用'git push --mirror --tags'来代替上一条命令。 – aymericbeaumet