1

I have a private repo in Gitlab and I would like to make its copy in bitbucket. I tried using Import a Repository feature and it works fine. It however clones the parent project and not the submodules. I see the reference to the submodules in the imported parent project. enter image description here

How do I clone the submodules?

Cheers!

Archit Arora
  • 2,508
  • 7
  • 43
  • 69

1 Answers1

1

You should:

  • either keep those references unchanges, and clone your new imported repo with the --recurse-submodule option:

    git clone --recurse-submodules
    

That will work if those submodules reference public repos themselves.

  • or you should repeat your import process for each private submodule, and then update the .gitmodules URLs of your first imported repo.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Is there a way to do it in Bitbucket? Bitbucket doesnt have a CLI to run these commands. – Archit Arora Mar 29 '19 at 06:02
  • @ArchitArora Once you have modified the submodule URL, all you need to do is push back the modified .gitmodules. Anyone else cloning that new repo would get the new submodules – VonC Mar 29 '19 at 06:04