简体   繁体   English

如何与Github仓库同步?

[英]How to sync with Github repos?

I have to setup a git server to host about 200 public repos. 我必须设置一个git服务器来托管大约200个公共仓库。 It is for those servers which cannot access Internet(especially, Github). 适用于那些无法访问Internet(尤其是Github)的服务器。

Here is how I am doing it: 这是我的做法:

  1. cd /data/githubRepos/bootstrap && git pull cd / data / githubRepos / bootstrap && git pull
  2. cd /data/gitLocalRepos/ && rm -rf bootstrap.git && git clone --bare /data/githubRepos/bootstrap bootstrap.git cd / data / gitLocalRepos / && rm -rf bootstrap.git && git clone-裸露/ data / githubRepos / bootstrap bootstrap.git

and do the same operations for other repos. 并对其他存储库执行相同的操作。

Is there some better solutions? 有更好的解决方案吗?

我建议您创建一个裸存储库(通过定期git pull与gitHub保持同步)并通过git-daemon本地导出到其他工作副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM