I have a GitHub repo that contains two submodules. I made several changes to these submodules and committed them. However, it seems I have not done this correctly.
I recently lost my local copy of the repository, and am trying to clone the remote. However, when I run
git clone --recursive myrepo.git
I get the error:
fatal: reference is not a tree: ...
Unable to checkout ... in submodule path....
Unable to checkout ... in submodule path....
When I click the submodule link the GitHub, I get a 404 error.
I have two questions.
It seems it is not possible to restore these submodules with the commits I have made to them. Is this true?
If #1 is true. What is the best way to pull back in the current upstream submodules (considering the error above)? I can reproduce the commits I made to the submodules manually fairly easily.