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
获得自定义版本。
这有可能吗?