这个绿色图标在 github 存储库中是什么意思? [英] What does this green icon mean in a github repository?

查看:23
本文介绍了这个绿色图标在 github 存储库中是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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?

推荐答案

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

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 --init is run, and then the referenced commit (784fd39) will be checked out.

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

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.

这篇关于这个绿色图标在 github 存储库中是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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