E
E
Elena Stepanova2019-02-26 16:47:04
git
Elena Stepanova, 2019-02-26 16:47:04

How to work with submodules in a project if the development is in the submodule repositories?

Moved several submodules to separate repositories in the project, added them `
git add submodule [email protected]`
`git submodule init`
`git submodule update`
the main project does not affect the code of submodules, it only pulls them up.
There are gitlab_ci pipelines for pushing submodules to repo, is it enough to set
```
cd $MAIN_PROJECT && git submodule update
``` in triggers
or something else is needed to update the main repo?
How to work with the main project locally? Is git pull && git submodule update sufficient before pushing changes (not affecting submodules), or should submodules be pulled and committed to the main repository?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Larisa .•º, 2019-02-27
@barolina

Cloning a project with submodules
https://git-scm.com/book/ru/v1/Tools-Git-Submodules...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question