[英]clone a branch from GIT
我想从git存储库中签出OpenStack Neutron的分支JUNO。 正确的URI是什么? 如果我做
% git clone git://github.com/openstack/neutron/tree/stable/juno/
它说:
openstack/neutron/tree/stable/juno is not a valid repository name
但是我确实在https://github.com/openstack/neutron/tree/stable/juno/看到了这个分支。 我究竟做错了什么? 谢谢。
您不克隆分支,而是克隆整个项目:
$ git clone git://github.com/openstack/neutron
Cloning into 'neutron'...
remote: Counting objects: 105856, done.
remote: Total 105856 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (105856/105856), 44.17 MiB | 1.06 MiB/s, done.
Resolving deltas: 100% (68444/68444), done.
完成之后,您可以简单地签出您感兴趣的分支。例如:
$ git checkout -b juno -t origin/stable/juno
Branch juno set up to track remote branch stable/juno from origin.
Switched to a new branch 'juno'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.