0

There are 3 submodules in my directory.

I am trying to update all my submodules using the command

   git submodule foreach git submodule update

Two of them are updated fine and One is throwing the error:

 No submodule mapping found in .gitmodules for path 'LibTecho'

I am unable to do init and update for the module 'LibTecho'

Here is my .gitmodules

[submodule "TechEngine"]
    path = TechEngine
    url = git@github.com:TechApp/TechEngine.git
[submodule "LibTechCreate"]
    path = LibSTechCreate
    url = git@github.com:TechApp/LibTechCreate.git
[submodule "LibTecho"]
    path = LibTecho
    url = git@github.com:TechApp/LibTecho.git

I tried:

  1. Removing the submodule and adding it again as mentioned in here

    git rm --cached LibTecho
    

and

   git submodule add git@github.com:TechApp/LibTecho.git
  1. Checked the entries which reference to submodule:

    git ls-files --stage | grep 160000 
    

and I found that all three libs are listed properly.

  1. I removed the submodule and then cloned again:

    git clone --recursive git@github.com:TechApp/LibTecho.git
    
  2. Removed the submodules section in .git/config file

    • There are no other .gitmodules file in my directory.

Even after multiple tries, I'm unable to update my submodule.

Edit:

when I try to pull from submodule git using source tree, I get this error message too:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree submodule update --init --recursive No submodule mapping found in .gitmodules for path 'LibTecho'

Community
  • 1
  • 1
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

1 Answers1

0

I found out what I did wrong.

I am doing the

  git rm --cached LibTecho

in the project directory folder.

To resolve this issue, I have to move to the submodule folder ,in my case it is LibTecho, and then do

 git rm --cached LibTecho

and do git submodule update --init

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109