我想使用缓存加速网络中一些 git-repos 的克隆。 我设置了存储库并运行 git-daemon。
现在我可以打电话了
git clone git://my_ip/my_repo
失败的是
git clone --reference git://my_ip/my_repo git://github.com/my_repo.git
与
fatal: path 'git://my_ip/my_repo' does not exist
有没有办法将远程存储库用于--reference
?
或者我需要本地引用吗?
最佳答案
--reference
仅与本地存储库有关。请参阅 https://git-scm.com/docs/git-clone#git-clone---reference-if-ableltrepositorygt 处的文档:
If the reference repository is on the local machine, automatically setup .git/objects/info/alternates to obtain objects from the reference repository.
关于git - 如何使用远程 git-repos 进行 git clone --reference,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46552380/