git clone,“check out files”阶段被跳过

时间:2015-12-22 10:31:21

标签: git git-clone git-checkout

ubuntu@site3-user03:/projects$ git clone git://git.alsa-project.org/alsa-driver.git  

进行了。它产生了以下输出

Cloning into 'alsa-driver'...
remote: Counting objects: 208801, done.
remote: Compressing objects: 100% (41538/41538), done.
remote: Total 208801 (delta 162528), reused 206283 (delta 160012)
Receiving objects: 100% (208801/208801), 37.00 MiB | 1.53 MiB/s, done.
Resolving deltas: 100% (162528/162528), done.
Checking connectivity... done.
ubuntu@site3-user03:/projects$

但是,由于某些未知原因,克隆过程不包括该阶段 签出文件:100%(xyz / zyx),已完成。
通常,克隆过程包括结账到工作空间。在最终效果中,我的私人分叉有空的工作空间,我自己必须决定哪些分支可能不是直截了当。

ubuntu@site3-user03:/projects/alsa-driver$ git ls-remote origin
a1c6fbc1a65d8a755425d0b56077868148512891    HEAD
1721fb542b00f1c7aebc923732068f403b6062ad    refs/heads/build
a1c6fbc1a65d8a755425d0b56077868148512891    refs/heads/master
71b3b2b41dfbdeda78e2e7b62fe2afa8b451fb6e    refs/heads/mirror
b044dfe04f636d87fd391b575ba41e495e68e973    refs/heads/release
6386d9e39e6f364698648f4e4741897f83b00121    refs/tags/build/v1.0.1
234b00ebe6e1513c3ce8cdd83999c255bd5516eb    refs/tags/build/v1.0.10
f888eb06d4c7af89faa2f9dda189d488312ecb07    refs/tags/build/v1.0.10rc1
e4c4d1037521f536b79f8d145979ec869db353f9    refs/tags/build/v1.0.10rc2
....
many more tags

我的期望是克隆根据远程的HEAD执行结账,指向远程的某些提交。
跳过退房阶段的可能原因是什么?
在克隆过程正在进行中我在工作空间中创建了小自述文件。但是,到目前为止,该文件仍然未被跟踪。没有计划跟踪该文件。
此文件创建是否会扰乱克隆过程,因此无法包含结帐阶段?

ubuntu@site3-user03:/projects$ git clone git@git.alsa-project.org:alsa-driver.git alsa-driver  
Cloning into 'alsa-driver'...  
The authenticity of host 'git.alsa-project.org (77.48.224.243)' can't be established.  
RSA key fingerprint is f1:0e:a7:1f:bc:1b:9f:71:00:85:c9:4a:8a:d9:d6:33.  
Are you sure you want to continue connecting (yes/no)? no   
Host key verification failed.  
fatal: Could not read from remote repository.  

Please make sure you have the correct access rights  
and the repository exists.  
ubuntu@site3-user03:/projects$

所以,我放弃了它,因为我曾经有过简单的克隆过程,而且对于确认继续在未经认证的主机上产生的所有影响并没有丝毫想法。

git help clone

以及在此处使用的示例使用URL格式

 The following syntaxes may be used with them:
   ·   git://host.xz[:port]/path/to/repo.git/
   ·   http[s]://host.xz[:port]/path/to/repo.git/
   ...
 git clone git://git.kernel.org/pub/scm/.../linux.git my-linux
 git clone --reference /git/linux.git \
                   git://git.kernel.org/pub/scm/.../linux.git \
                   my-linux
·   Create a bare repository to publish your changes to the public:
    git clone --bare -l /home/proj/.git /pub/scm/proj.git

以下使用的设置也适用:

ubuntu@site3-user03:/$ sudo find / -type f -name known_hosts
[sudo] password for ubuntu: 
ubuntu@site3-user03:/$ 

过去有一次我和其他克隆有过类似的效果。那次它是MSM SoC的Linux内核公共回购的克隆。但是,那个时候克隆过程也产生了一些“无法克隆,因为没有在远程找到???”的消息。被遗忘了什么?读。因此,在最终效果中,我还要在克隆过程之后手动签出。但是,在这种情况下没有出现这样的警告,要求alsa-driver公共回购。

1 个答案:

答案 0 :(得分:3)

我从未见过使用您用来克隆存储库的URL格式,因为标准应该是:git://git.alsa-project.org:alsa-driver.git,您使用的格式是以裸模式克隆存储库,就像指定存储库一样--bare命令行选项,基本上执行:

  

制作一个裸Git存储库。也就是说,不是创建<directory>并将管理文件放在<directory>/.git中,   将<directory>本身设为$GIT_DIR。这显然意味着   -n因为无处可查看工作树。远程的分支头也直接复制到相应的本地   分支头,而不将它们映射到refs/remotes/origin/。当这个   使用选项,既不是远程跟踪分支也不是相关的   配置变量已创建。

如果您查看要尝试克隆的documentation of the project,您会注意到要克隆您必须执行的特定项目:

git clone git@git.alsa-project.org:alsa-driver.git alsa-driver
cd alsa-driver
git branch build remotes/origin/build
git branch mirror remotes/origin/mirror
git branch release remotes/origin/release