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

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:

  • 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
    
  • Checked the entries which reference to submodule:

    git ls-files --stage | grep 160000 
    
  • and I found that all three libs are listed properly.

  • I removed the submodule and then cloned again:

    git clone --recursive git@github.com:TechApp/LibTecho.git
    
  • 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'


    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

    链接地址: http://www.djcxy.com/p/92366.html

    上一篇: 为什么'git subtree`不工作,即使我在Ubuntu 12.10上安装了git 1.8.3.2?

    下一篇: .gitmodules中找不到用于路径'LibTecho'的子模块映射