Git 浏览回购协议中已标记发行的列表?
我正在尝试签出OpenSSL 1.0.2a(而不是Master)。OpenSSL已经标记了发布,我正在尝试浏览它们以确定实际名称。我知道它们有1.0.0、1.0.1和1.0.2(但它们的命名更为复杂) 根据,回购协议位于git://git.openssl.org/openssl.git. 根据,我需要使用Git 浏览回购协议中已标记发行的列表?,git,Git,我正在尝试签出OpenSSL 1.0.2a(而不是Master)。OpenSSL已经标记了发布,我正在尝试浏览它们以确定实际名称。我知道它们有1.0.0、1.0.1和1.0.2(但它们的命名更为复杂) 根据,回购协议位于git://git.openssl.org/openssl.git. 根据,我需要使用git标记: $ git tag git://git.openssl.org/openssl.git fatal: Not a git repository (or any of the par
git标记
:
$ git tag git://git.openssl.org/openssl.git
fatal: Not a git repository (or any of the parent directories): .git
如何浏览Git回购中持有的标记发行
为完整起见,不讨论此主题。
git标记
假定您在本地签出了回购协议的克隆。(这就是为什么它抱怨没有在git存储库中。)
要实现所需,您可能需要首先克隆它,然后切换到所需的标记:
git clone git://git.openssl.org/openssl.git
cd openssl
git tag -l # to list the tags
git checkout tags/<name> # to switch to the desired tag
太好了,非常感谢。我不知道有这样的区别,“你可能想先克隆它,然后切换到所需的标签”-事实上,这是另一种方式。一旦我确定了我想要的分支,我将签出分支而不是主分支。Master在我要进行更改的特定区域有很大不同。@jww
clone
和checkout
是两件不同的事情。虽然可以克隆存储库并仅获取所有分支的特定子集,但只克隆整个存储库并签出您感兴趣的分支要容易得多。git标记
对我不起作用。它应该是git标签吗?
git ls-remote --tags git://git.openssl.org/openssl.git