Jiahao Cai
Jiahao Cai

Reputation: 1250

How can I clone the entire git repo

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'

Upvotes: 0

Views: 717

Answers (1)

Michael Mior
Michael Mior

Reputation: 28753

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.

Upvotes: 1

Related Questions