question to update a submodule in a submodule

Viewed 18

I have a problem with submodule

repo A has submodule B and in B has a submodule C1.

check out A and submodule B along with C1 is fine with

path_of_A> git submodule update --init --recursive

However when B is added with new submodule C2 the command above does not work anymore. B is not updated with new C2. What to do in this case?

1 Answers

By default, an update would only update B with the --remote option, and only if C2 was added (as a submodule, with git submodule add /url/C2 in B), then pushed.

If C2 appears empty, in B after a git submodule update --recursive --remote, it might be because C2 was not added as a submodule, but just as a nested Git repository entry.

Related