是否可以在Git子模块中叠加文件?

时间:2017-11-29 13:00:17

标签: git git-submodules

Git存储库B包含另一个存储库作为子模块B

我可以在A子树中添加文件,但只将其提交给B吗?

该要求要求将B中未包含的文件存储在A内的B子树中。提交A时应忽略该文件,但在提交B时包含该文件。

该想法的扩展将会看到该文件的两个版本,A中的原始版本和B中的自定义版本。如果这样的A被单独克隆,则该副本将看到原始文件,但在子模块中,您将从[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building shop 0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) > test-compile @ shop >>> [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ shop --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ shop --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ shop --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] skip non existing resourceDirectory C:\Users\Валера\IdeaProjects\shop\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ shop --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) < test-compile @ shop <<< [INFO] [INFO] --- spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) @ shop --- [INFO] Attaching agents: [] Listening for transport dt_socket at address: 5005 获得自定义版本。

这有可能吗?

0 个答案:

没有答案