克隆错误后将Git签出到标记

问题描述 投票:0回答:1

我成功克隆了一个远程git仓库上的分支branchX,并希望在某个标签tagX上使用代码库。我提到here结帐到标签。但它给了我以下错误:

error: pathspec 'tagX' did not match any file(s) known to git.

如何解决此错误?有没有另一种指向标签的方法?

git git-tag
1个回答
2
投票

您必须从远程获取所有标记。执行命令git fetch --tags然后尝试检出。

© www.soinside.com 2019 - 2024. All rights reserved.