Answer the question
In order to leave comments, you need to log in
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
Answer the question
In order to leave comments, you need to log in
the file .gitmodules
is 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/common
should 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 questionAsk a Question
731 491 924 answers to any question