0

I've been having issues with my submodules downloading with my master repo. Once I clone a repo, if I run git submodule update --recursive the command just sits there for forever. It'll sit there all day long, I let it do it all day one day to make sure it wasn't because of waiting for downloading the files or something. (I have also tried git submodule update --init and git submodule update --init --recursive)

But if I cd into the area where the submodule is and manually do a git clone https://somewhere.git to download the submodule/repo into the correct place, it works fine.

I would just like this to be cohesive and all together in a single command

Any ideas?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
Coty Embry
  • 958
  • 1
  • 11
  • 24
  • 1
    have you used the exact same url as the one mentioned in the `.gitmodules` file at the root of your repo ? – LeGEC Mar 30 '23 at 18:25
  • Could this be related to your subrepos referencing each other and therefore inifitely run with `--recursive`? – Torge Rosendahl Apr 02 '23 at 02:00

1 Answers1

0

Try and activate the Trace2 API (Git 2.22+, Q2 2019), to check what operation is done, and from which point you start waiting forever.

export GIT_TRACE2_EVENT=~/log.event
git submodule update --recursive

As an alternative, try and a git clone --recurse-submodules to check if the clone can initialize the submodules, instead of your separate command.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    Thank you! I will be trying this! Just need a little help to see what is going on, this will surely help me figure out where the hangup is and didn't know where to start. I have tried the `git clone --recurse-submodules` and it suffers from the same issue but thank you for mentioning it – Coty Embry Apr 11 '23 at 18:46