我如何在这个结构中使用子模块 gitlab

how i can use submodule gitlab in this stracture

我在 git实验室工作。我为任何项目使用多重核心(主)库。在开发过程中,每个项目可能需要在核心库中添加或更改相同的功能。

我使用 git 子模块将新更改同步到核心(主)并提交它,它工作得很好。这是我在提交并推送所有更改与 master 同步后在核心库中的问题,我如何忽略子模块中的相同文件或文件夹提交。

我的结构

核心库

-library
--crm
---controller
----index.php
---model
----index.php
---view
----index.php

================= 这个我的项目

-library
--crm
---controller
----index.php
---model
----index.php
---view
----index.php (change)
----about.php (add)

==================

我为我的项目构建了新的 repo,如何忽略子模块中的提交视图文件夹?模型和控制器允许提交和推送。

很简单就能用

ignore = dirty

在 .gitmodules