0

I have a project with two submodules which I got from other people. I made modifications in both, but only one gets reported as modified and can therefore be staged for committing. The other one is in the "Untracked files" section. What did I break ? Both the .gitmodules files and the .git/config file contain the same information about both submodules (name, origin repo, etc ...). What other information must I provide ? Where else are submodules referenced by git ?

Thanks in advance.

Charles
  • 988
  • 1
  • 11
  • 28
  • 1
    It would be due to the detached HEAD in your submodule branch. Go into your submodule path and then git checkout your development branch. Also, You must run two commands: git submodule init to initialize your local configuration file, and git submodule update to fetch all the data from that project and check out the appropriate commit listed in your superproject. Referece: https://git-scm.com/book/en/v2/Git-Tools-Submodules – Vishal Rajole May 24 '17 at 08:42
  • Head isn't detached in either - stuff is committed, all is clean. When I try git submodule init with the paths to my malfunctioning submodules I get : error: pathspec '' did not match any file(s) known to git. – Charles May 24 '17 at 08:57

0 Answers0