我试图检查OpenSSL的标记版本。根据{{3}},我找到了带标记的版本:
git ls-remote --tags git://git.openssl.org/openssl.git
...
ab2de707f72a82e0294bae08cca97455b635a656 refs/tags/OpenSSL_1_0_2a
...
根据Browse list of tagged releases in a repo?,我使用git checkout
或git fetch
来检查已标记的版本。所以我尝试用以下内容检查标记版本。注意最后四个命令不要使用" .git"任何地方,但那是Git抱怨的。
$ git clone git://git.openssl.org/openssl.git/refs/tags/OpenSSL_1_0_2a
Cloning into 'OpenSSL_1_0_2a'...
fatal: Could not read from remote repository.
$ git clone git://git.openssl.org/refs/tags/OpenSSL_1_0_2a
Cloning into 'OpenSSL_1_0_2a'...
fatal: remote error: access denied or repository not exported: /refs/tags/OpenSSL_1_0_2a
$ git fetch git://git.openssl.org/openssl.git/refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
$ git checkout git://git.openssl.org/openssl.git/refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
$ git fetch git://git.openssl.org/refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
$ git checkout git://git.openssl.org/refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
$ git checkout git://git.openssl.org refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
$ git fetch git://git.openssl.org refs/tags/OpenSSL_1_0_2a
fatal: Not a git repository (or any of the parent directories): .git
Git在哪里找到" .git"在最后四个命令?如何发出命令,以便Git不添加" .git"某处?
答案 0 :(得分:2)
你不能只在git中签出一个标签。你必须用
克隆整个存储库git clone git://git.openssl.org/openssl.git
然后你可以看看特定的标签:
git checkout my-tagname
每个git存储库在其根目录中都有一个.git文件夹,用于存储存储库的元数据和历史记录。作为分散版本控制系统,所有信息必须在客户端才能工作,因此无法检查子树。
(与svn相反,你到处都有.svn文件夹,你可以查看子树)