1

In my project, i am using sub-modules to manage the dependencies.

I ran the command once and the repos are cloned and fetched.

git submodule update --init --recursive

Now, I have deleted the folder (_internals) in which they were cloned.

when running the command again, it does not fetch anything.

Not Sure whats wrong. Any pointers or help ?

Tarun Nagpal
  • 690
  • 1
  • 8
  • 21

1 Answers1

1

I hope you have not gone through this answer

To Quote it:

git pull --recurse-submodules --jobs=10

**a feature git first learned in 1.8.5.**

Until the bug is fixed, for the first time you do need to run

git submodule update --init --recursive

Or try running:

git pull --recurse-submodules

Can you try this: Move into the submodule's directory, then do a git reset --hard to reset all modified files to their last committed state. Be aware that this will discard all non-committed changes. From https://stackoverflow.com/a/10906596/6517383

Black Mamba
  • 13,632
  • 6
  • 82
  • 105
  • I tried both the ways. But it says "already up to date". But the folders in which the code repos were there is deleted. But there is no code. – Tarun Nagpal Jul 17 '20 at 06:47
  • 1
    Can you try this: ```Move into the submodule's directory, then do a git reset --hard to reset all modified files to their last committed state. Be aware that this will discard all non-committed changes.``` From https://stackoverflow.com/a/10906596/6517383 – Black Mamba Jul 17 '20 at 06:51