1

I've got a problem with git submodules pull: I have two reporistories, let's call them repo A and repo B.

Repo B is a submodule of repo A, so I added repo B as a submodule of A with this command line:

git submodule add [email protected]:Aracthor/B.git libvvgl

But when I try to clone my project like this:

git clone [email protected]:Aracthor/A.git

My B project folder is empty and when I try this (solution from this answer):

git clone --recursive [email protected]:Aracthor/A.git

My B folder contains only an empty file .git, that contains itself an only line:

../.git/modules/B/

That is a path to a folder with some git data, but still not my B repository files.

I already tried this too:

git submodule update --init --recursive

And nothing changes.

When I Looked at my Github repositories (Here for A and Here for B included) I've noticed something strange: A repository is linking its submodule to a revision key (32a0a80f17ee3628cb99b886c68e566981d7deff) that doesn't exist on any commit on B repository, and that lead to a 404 when clicked on Github.

So from here, it looks like a Github bug... But I would prefer your solutions rather than accuse this plateform.

1 Answer 1

1

That means A has recorded a gitlink (special entry in the index) referencing a SHA1 of the submodule B which was never pushed to GitHub.

When A used B in a local clone, B was at 32a0a80. A was pushed, but B was not. Hence the issue.

Normally, a git submodule update --init would populate B with files from commit 32a0a80, but since that commit was not pushed, that command would fail as well.

Sign up to request clarification or add additional context in comments.

1 Comment

Finally, thanks to your links (and this answer I finally deleted my submodule to create a new one, linked to the good version. Thanks a lot!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.