Answer the question
In order to leave comments, you need to log in
How to start using git submodules?
The project uses git in the main repository /project and /project/code/vendor/sub-repo.
Recently I learned that you can make submodules https://git-scm.com/book/en/v1/%D0%98%D0%BD%D1%81%...
There were a couple of questions.
1. Can I add a link to an existing submodule?
`repo` already exists in the index
2. Did I understand correctly that in the future it will be possible not to worry about deploying a dozen repositories, but only install the base one, and the rest will be installed by themselves?
Answer the question
In order to leave comments, you need to log in
The easiest way is to remove the directory from the index and initialize the submodule in its place. I don't know how this works with subsubfolders, but directly editing the .gitmodules modules file might work:
[submodule "sub-repo"]
path = project/code/vendor/sub-repo
url = https://project/code/vendor/sub-repo
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question