如何解决这个Git问题? [英] How to solve this Git issue?

查看:97
本文介绍了如何解决这个Git问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在其网页上看到的回购:





我无法将它拉到我的本地计算机,无法浏览它等。

我该如何解决此问题?

解决方案

看起来像 gitlink ,这是一个索引中的特殊条目,它记录了SHA1。 p>

它是嵌套的git repo的典型代码,除了它的根文件夹外,父代repo会忽略它:记录该嵌套git repo的SHA1。

b
$ b

问题是:父回购并不知道这个嵌套的git回购是从哪里来的。

这就是git submodule 增加了:远程repo url 另外 gitlink(SHA1)。该URL存储在 .gitmodules 文件中。这样,一个git clone --recursive知道如何填充这些灰色文件夹:它知道要克隆什么(url)以及要检出的内容(gitlink的SHA1)。



<但是在这里,你只需要SHA1,没有网址。


I see in the repo displayed on its web page:

I can't pull it to my local computer, can't browse it, etc.

How can I resolve this issue?

解决方案

That looks like a gitlink, a special entry in the index which records a SHA1.

It is typical of a nested git repo, which is ignored by the parent repo except for its root folder: the SHA1 of that nested git repo is recorded.

The problem is: the parent repo does not know from where this nested git repo comes from.
That is what a git submodule adds: a remote repo url in addition of the gitlink (SHA1). That url is stored in a .gitmodules file. That way, a git clone --recursive knows how to populate those gray folders: it knows what to clone (url) and what to checkout (the SHA1 of the gitlink).

But here, you just have the SHA1, no url.

这篇关于如何解决这个Git问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆