E
E
Evgeny Afanasiev2018-11-30 11:59:28
css
Evgeny Afanasiev, 2018-11-30 11:59:28

Git indexes the submodule in the parent. How to fix?

Good afternoon!
The project uses two submodules. One of them behaves as expected, changing the data in the submodule shows that the submodule has a new state. When changing data in another submodule, the project considers these changes as its own and offers to commit them to itself. Can you please tell me how to fix this?
.gitmodules:

[submodule "backend/common"]
path = backend/common
url = blah blah
branch = blah blah
[submodule "frontend/common"]
path = frontend/common
url = blah blah
branch = blah blah

UPD:
Or tell me which configs to look at least? I reviewed the git folder, there are no differences in the submodule configs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shumkin, 2018-12-03
@emafanasev

the file .gitmodulesis not the only place where the submodule is added, the submodule is also added to the index,
probably it was added, but before the commit - dropped from the index
git whatchanged frontend/common backend/commonshould show the history of changes for both submodules ... if one of them is missing, then in fact, it was not added correctly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question