我正在尝试检查OpenSSL的标记版本。根据Browse list of tagged releases in a repo?,我将标记的版本定位为:
git ls-remote --tags git://git.openssl.org/openssl.git
...
ab2de707f72a82e0294bae08cca97455b635a656 refs/tags/OpenSSL_1_0_2a
...根据Checkout remote Git branch,我使用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“?
发布于 2015-04-26 19:56:57
你不能就这么用git签出一个标签。您必须克隆整个存储库
git clone git://git.openssl.org/openssl.git然后,您可以查看特定的标记:
git checkout my-tagname每个git存储库的根中都有一个.git文件夹,用于存储存储库的元数据和历史记录。作为一个独立版本控制系统,所有这些信息都必须在客户端才能工作,因此不可能签出子树。
(与svn不同,这里到处都有.svn文件夹,可以签出子树)
https://stackoverflow.com/questions/29882714
复制相似问题