简体   繁体   English

git checkout分支不起作用

[英]Git checkout branch not working

I am new in git and trying to understand what is wrong here. 我是git的新手,试图了解这里的问题。

[root@root /]# git describe --tags
16.0.13-7-g56099d7

Try to upgrade to 16.0.15 branch or tags (got error) 尝试升级到16.0.15分支或标签(发生错误)

[root@root /]# git checkout 16.0.15
error: pathspec '16.0.15' did not match any file(s) known to git.

Trying different way (no error) 尝试不同的方式(没有错误)

[root@root /]# git checkout -b 16.0.15
Switched to a new branch '16.0.15'

But still showing older version 但仍显示旧版本

[root@root /]# git describe --tags
16.0.13-7-g56099d7

Am i missing something? 我想念什么吗?

First, change to an appropriate directory, you seem to be doing this at root or / level. 首先,切换到适当的目录,您似乎在root或/级别执行此操作。 If possible you should also change user to something other than root . 如果可能,还应该将用户更改为root以外的root


Next, clone the repo from the new location; 接下来,从新位置克隆仓库。

git clone https://github.com/openstack/openstack-ansible.git

then change into the cloned repo's directory; 然后转到克隆的存储库目录;

cd openstack-ansible/

checkout the desired branch; 签出所需的分支;

git checkout 16.0.15

lastly, follow the rest of the instructions at https://docs.openstack.org/openstack-ansible/pike/user/minor-upgrade.html 最后,按照https://docs.openstack.org/openstack-ansible/pike/user/minor-upgrade.html上的其余说明进行操作

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

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