12

I trying git clone this case.

For example in git branch:

  • external repo 1 @ 797131b
  • external repo 2 @ 04a1ffe
  • external repo 3 @ b8132df

It is external linked repositories in branch.

I want git clone repository with external linked repositories.

But, I can only check empty directory after git clone.

How to clone git repository with external linked repositories in once try?

2

1 Answer 1

22

To automatically initialize and update each submodule in the repository, pass --recursive to the git clone:

git clone --recursive <repoAddress>

More about submodules: https://git-scm.com/book/en/v2/Git-Tools-Submodules

1
  • Thank you very so much. Good Luck. Jul 19, 2016 at 16:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.