I have a repo (parent project) that relies on a submodule. I need to update the submodule to the latest commit but it is not working.
I created the submodule like this:
git submodule add https://github.com/library.git
(not the real name)
I tried to update it with this:
git submodule update --remote --merge
It does not work. I still have the old code in the parent project. When I look at the code in the repo of the submodule the new code is there.
I updated the repo of the submodule, commit and push. That works. I update the submodule in the parent project, that does not work. I make a change to the parent project, commit and push. The submodule is still not updated.
I tried git submodule --init
as suggested in one post. This is a terrible command. First, it copies all the code in the submodule to the parent project which is a waste, potential source for errors now with the same code in two locations plus its the exact same wrong (old) code.
If I issue this command: git submodule update --remote --merge
, I get no response.
Anyone know how I can update the parent project to point to the latest submodule?