一些显示为子模块的 gitlab 文件夹

Some gitlab folders showing as submodules

请原谅这个可能很幼稚的问题 - 我无论如何都不是软件工程师...

我正在使用 .git 来跟踪 .xlsx 文件的修订更改。我创建了一个 git 存储库("main" - 由 Gitlab 托管)- 文件夹结构如下:

当我提交并推送 "main" 文件夹时,Gitlab 会拾取所有文件夹,但将 "pricing_model"、"inventory_model" 和 "monthly_close" 分类作为子模块 (see attached)。因此,我无法通过 Gitlab 的界面来查看子模块中的文件。

问题

  1. 如何配置我的主文件夹以便我可以钻取所有子文件夹?
  2. 在这种情况下 "submodule" 是正确的术语吗?

是的,git 支持一个名为 submodules 的功能,它基本上是一个存储库中的一个存储库。这意味着如果存储库在 GitLab 上不存在,您将无法浏览它的内容。

但是,如果您想在 GitLab 中浏览这些文件,则需要为每个子模块创建一个新项目并将它们推送到那里。然后您可以更新 .gitmodules 文件中的引用。例如:

[submodule "inventory"]
path = inventory
url = https://gitlab.com/<group>/<project>
branch = master


[submodule "monthly_close"]
path = pricing_model
url = https://gitlab.com/<group>/<project>
branch = master


[submodule "pricing_model"]
path = pricing_model
url = https://gitlab.com/<group>/<project>
branch = master