GitLab - 损坏提交后的奇怪图标和条目 [英] GitLab - Strange Icon and Entry after corrupt commit

查看:18
本文介绍了GitLab - 损坏提交后的奇怪图标和条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的仓库(在文件视图中)中找到以下 gitlab 条目的描述:

I tried to find a description for the following gitlab entry in my repo (in files-view):

我认为该文件已损坏,因为我在树中嵌套"了 git 存储库,或者更好的是,不止一个 .git 文件(如果这有意义的话).

I believe this file was corrupted because I had 'nested' git repos, or better, more than one .git file in the tree (If that makes even sense).

但老实说,我什至不知道用谷歌搜索什么 :P然后我在stackoverflow上快速浏览了这里的响应,但我也没有看到.有人可以告诉我在哪里可以找到这些描述或告诉我它的含义吗?我不确定删除它是否会导致回购的其余部分损坏或其他一些连锁效应.GitLab 版本是 6.2.4.

But to be honest, I didn't even know what to google for :P Then I scanned quickly through the reponses here on stackoverflow but I didn't see it either. Can somebody please either tell me where I can find a description of those or tell me what it means? I am not sure if deleting this will cause the rest of the repo to corrupt or some other knock-on effect. GitLab version is 6.2.4.

提前致谢,

迈克尔

推荐答案

这是一个git submodule,你可以输入:

It is a git submodule, and you can type:

git ls-tree HEAD -- ws-dom-full

你会看到一个 gitlink,它是索引中的一个特殊条目,它记录了子模块 repo 的 sha1.(模式160000)

You will see a gitlink, that is a special entry in the index which records the sha1 of the submodule repo. (Mode 160000)

当您克隆父存储库时,该文件夹为空.
你需要:

When you clone the parent repo, that folder is empty.
You need:

git submodule update --init

然后你会看到子模块的内容.

And you will see the submodule content then.

删除子模块(从索引和磁盘中):

To remove a submodule (from the index and the disk):

git submodule deinit -- ws-dom-full
git rm -- ws-dom-full
git add -u .
git commit -m "Remove ws-dom-full submodule"
git push

这篇关于GitLab - 损坏提交后的奇怪图标和条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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