I am working in my branch and I needed an external submodule, so from the root of my project I did.
git submodule add https://github.com/blah/blah ./location/submodue
Cloning into ...
...
git commit -am "Added submodule"
This seems to have worked and I was able to carry on working on the main branch, while working I noticed a bug in the submodule, so I made the change directly in it.
But when I did a git add .
no changes were found, the code changes I made were not found. There was nothing to commit but git did report git +0 ~1 -0!
, but I was not able to add/commit that one change.
So I made the changes to the 'main' project, then I pulled the changes and everything was fine again.
So how can I make changes to the submodule and commit those changes from the 'main' branch that uses that submodule
(Let me know if you want the links/paths to the actual github projects).