Multiple .gitmodules files in the root directory?
Multiple .gitmodules files in the root directory?
We have implemented a branching strategy where we have a dev
branch that gets built and published to our QA environment, and then a release
branch that gets built and published to our stage and eventually our production environments.
dev
release
I have a project that has multiple submodules, and will also get built and published to our QA environment and also built and published to our stage and production environments. It will also have dev
and release
branches.
dev
release
When we pull this project prior to build, if it's on the dev
branch I want all the submodules to also pull from the dev
branch, and if it's on the release
branch I want all the submodules to then pull from their release
branches as well.
dev
dev
release
release
Is there a way to accomplish this with some environment variables to specify which submodule branches to pull, or perhaps a .gitmodule
file for both dev
and release
branches that can be specified on git submodule init
?
.gitmodule
dev
release
git submodule init
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.