I have a project with a Git submodule. It is from an ssh://... URL, and is on commit A. Commit B has been pushed to that URL, and I want the submodule to retrieve the commit
In my case, I wanted git
to update to the latest and at the same time re-populate any missing files.
The following restored the missing files (thanks to --force
which doesn't seem to have been mentioned here), but it didn't pull any new commits:
git submodule update --init --recursive --force
This did:
git submodule update --recursive --remote --merge --force