我正在尝试检查 OpenSSL 1.0.2a(而不是 Master)。 OpenSSL 已标记版本,我正在尝试浏览它们以确定实际名称是什么。我知道它们有 1.0.0、1.0.1 和 1.0.2(但它们的命名更复杂)。
根据 OpenSSL Git repository ,存储库位于 git://git.openssl.org/openssl.git。
根据 How to see all tags in a git repository in command line , 我需要使用 git 标签
:
$ git tag git://git.openssl.org/openssl.git
fatal: Not a git repository (or any of the parent directories): .git
如何浏览 Git 存储库中保存的标记版本?
为了完整性,Git for beginners: The definitive practical guide不讨论这个话题。
最佳答案
git tag
假定您在本地 checkout 了该存储库的克隆。 (这就是为什么它提示不在 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
您还可以使用以下命令获取远程存储库中的标签列表,而无需先执行 git clone
:
git ls-remote --tags git://git.openssl.org/openssl.git
关于git - 浏览 repo 中标记版本的列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29882263/