I have a VSTS project with a git repo. The repo has some submodules that are also required as part of the software projects development.
Is there a way to create submodules inside the same VSTS project? The other option would be to split the development tasks between a VSTS project for the submodule and the project using the submodule which isn't ideal as there's a lot of overlap between the two as far as devleopment goes.
Git submodules may look powerful or cool upfront, but for all the reasons above it is a bad idea to share code using submodules, especially when the code changes frequently. It will be much worse when you have more and more developers working on the same repos.
Use the git submodule update command to set the submodules to the commit specified by the main repository. This means that if you pull in new changes into the submodules, you need to create a new commit in your main repository in order to track the updates of the nested submodules.
Git submodules allow you to keep a git repository as a subdirectory of another git repository. Git submodules are simply a reference to another repository at a particular snapshot in time. Git submodules enable a Git repository to incorporate and track version history of external code.
You can add multiple Git repositories to your VSTS Project. And you can push a repository that references another through submodules.
In the Code hub, expand the repository and click New Repository:
Use the second repository to store your submodules and reference it from the first repo. The submodule setup all happens locally on your local git repository, use whatever tool you prefer or the command-line and then push the repositories to VSTS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With