Na1*_*3-c 7 git git-clone git-checkout
ubuntu@site3-user03:/projects$ git clone git://git.alsa-project.org/alsa-driver.git
Run Code Online (Sandbox Code Playgroud)
被执行了.它导致了以下输出
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$
Run Code Online (Sandbox Code Playgroud)
但是,由于某些未知原因,克隆过程不包括检出文件的阶段
: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
Run Code Online (Sandbox Code Playgroud)
我的期望是克隆执行基于远程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$
Run Code Online (Sandbox Code Playgroud)
所以,我放弃了它,因为我曾经有过直接的克隆过程,而且对于确认继续未经验证的主机上所有产生的影响没有丝毫想法.
git help clone
Run Code Online (Sandbox Code Playgroud)
以及在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
Run Code Online (Sandbox Code Playgroud)
至于使用的设置以下也适用:
ubuntu@site3-user03:/$ sudo find / -type f -name known_hosts
[sudo] password for ubuntu:
ubuntu@site3-user03:/$
Run Code Online (Sandbox Code Playgroud)
过去一次,我与其他克隆有相似的效果.那次它是MSM SoC的Linux内核公共回购的克隆.但是,那个时候克隆过程也产生了一些"无法克隆,因为没有在远程找到???"的消息.被遗忘了什么?读.因此,在最终效果中,我还要在克隆过程之后手动签出.但是,在这种情况下没有出现这样的警告,要求alsa-driver公共回购.
我从未见过使用用于克隆存储库的 URL 格式,因为标准应该是 : git://git.alsa-project.org:alsa-driver.git,使用您使用的格式以裸模式克隆存储库,这就像指定--bare命令行选项,基本上执行:
创建一个裸 Git 存储库。也就是说,不要创建
<directory>管理文件并将其放置在 中<directory>/.git,而是将其<directory>本身设为$GIT_DIR. 这显然意味着-n因为没有地方可以检查工作树。此外,远程分支头会直接复制到相应的本地分支头,而不将它们映射到refs/remotes/origin/. 使用此选项时,既不会创建远程跟踪分支,也不会创建相关的配置变量。
如果您查看要尝试克隆的项目的文档,您会发现要克隆该特定项目,您必须:
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1418 次 |
| 最近记录: |