我们的项目涉及中国的5名开发人员和美国的3名开发人员。中国的服务器机器被认为是主机。我想设置一个从中国服务器到美国服务器的仓库镜像,这样我们当地的开发人员就可以更快地repo sync。现在从中国服务器发一个repo init / sync需要5个小时。
例如,假设中国的服务器名为server1.china.com,美国的服务器名为server2.usa.com。
使用以下命令从中国服务器拉取项目:
repo init -u ssh://server1.china.com/projectA/standard.git -b release17
repo sync我希望能够设置一个本地镜像,这样拉取项目就会变成:
repo init -u ssh://server2.usa.com/projectA/standard.git -b release 17
repo sync我还需要一个cron作业来定期运行,以便在初始设置后将最新的更改从server1拉到server2。
我看过关于使用git clone --mirror的讨论,但不太确定它是否能提供我所需要的东西。
谢谢
发布于 2014-01-24 00:58:30
您想要的是来自repo init -h的repo init --mirror
--mirror create a replica of the remote repositories rather
than a client working directory创建它之后,您可以使用repo sync使其保持最新。
https://stackoverflow.com/questions/20928486
复制相似问题