[英]git clone does not work when trying to clone a TensorFlow repository
当我做
~$ git clone https://github.com/tensorflow/models/tree/master/research/inception/inception
我收到一个错误:
克隆到'inception'中...远程:未找到致命:存储库' https://github.com/tensorflow/models/tree/master/research/inception/inception/ '未找到
当我将URL粘贴到浏览器中时,该URL实际上就起作用了。 因此,我对这里可能出现的问题感到困惑。 谢谢
您使用的内部URL不正确。 使用Git,您将无法选择性克隆。
正确的网址应该是
https://github.com/tensorflow/models.git
命令是
git clone https://github.com/tensorflow/models.git
我知道了,但是如果我想克隆子目录(例如inception),是否仍然需要使用上面的URL?
虽然您仍然可以克隆完整的仓库,但可以进行稀疏签出
mkdir myrepo
cd myrepo
git init
git config core.sparseCheckout true
git remote add -f origin https://github.com/tensorflow/models.git
echo "path/within_repo/to/desired_subdir/*" > .git/info/sparse-checkout
git checkout [branchname] # ex: master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.