git 这个绿色图标在 github 存储库中是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14448601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:03:31  来源:igfitidea点击:

What does this green icon mean in a github repository?

gitgithub

提问by TimDog

What does this green icon mean in Github? I know the commit link takes me to another repository. I need to do something similar. Is this a symlink? Or a submodule? Being still somewhat new to git, I'm wondering how I can replicate this myself. Once created, how do I update this external dependency?

Github 中的这个绿色图标是什么意思?我知道提交链接会将我带到另一个存储库。我需要做类似的事情。这是符号链接吗?还是子模块?对 git 仍然有些陌生,我想知道如何自己复制它。创建后,如何更新此外部依赖项?

Git repository - what's up with the green icon?

Git 存储库 - 绿色图标怎么了?

回答by cdhowie

This is a submodule: a link to a specific commit in another repository at a different URL. The repository will be cloned when git submodule update --initis run, and then the referenced commit (784fd39) will be checked out.

这是一个子模块:指向另一个存储库中不同 URL 的特定提交的链接。git submodule update --init运行时将克隆存储库,然后784fd39将签出引用的提交 ( )。

You can create submodules using git submodule add <url> <directory>, which will add a submodule reference for the given URL at the directory you specify, in the current working directory.

您可以使用 来创建子模块git submodule add <url> <directory>,这将在当前工作目录中为您指定的目录中的给定 URL 添加子模块引用。

回答by Tran Hung

You can use this method here. It's from another question in So, That topic is What does a grey icon in remote GitHub meanYou can ignore submodule step which is very complex.

您可以在此处使用此方法。它来自So,该主题中的另一个问题是远程GitHub中的灰色图标什么意思您可以忽略非常复杂的子模块步骤。