0

I am going to clone a Android repo on github, however, one of the folder, volley, cannot be cloned, it always empty.

I think the volley is from https://github.com/google/volley, so how can I download the entire repo. I have tried to use git clone --recursive, but it said fatal: no submodule mapping found in .gitmodules for path 'SimpleZhihuDaily/volley'

1
  • You need to run git submodule init and git submodule update Commented May 24, 2017 at 2:57

1 Answer 1

1

You did clone the entire repository. The volley folder is a git submodule which points at another repository. Normally, --recursive tells git to fetch all submodules (and the submodules of those submodules) when you clone the repository. However, the error message suggests there's a problem with the submodule repository. It looks like the repository no longer exists.

If this is indeed the Google volley repository you think it is, try cloning the repository without --recursive. Then edit the .gitmodules and change the path of the volley entry to https://github.com/google/volley.git. Then run

git submodule update --init --recursive

If the Google repository contains the same commit that the repository was pointing at, you'll be good to go.

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

3 Comments

Hi, thanks for your help, but I cannot find any file named .gitmodules, does that mean I need to create a new file named .gitmodules?
Yeah, based on the error message it sounds like the repository got corrupted. Can you add a link to the repository in your question?
Yes, I still cannot figure it out, I cannot find where the git defines the address of volley. Link

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.