GitLab - 腐败提交后的奇怪图标和条目 [英] GitLab - Strange Icon and Entry after corrupt commit
问题描述
我试图在我的仓库中找到以下gitlab条目的描述(在文件视图中):
I tried to find a description for the following gitlab entry in my repo (in files-view):
我认为这个文件已损坏,因为我已经'嵌套'git repos,或更好,树中不止一个.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.
提前致谢,
Michael
推荐答案
这是 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屋!