致命的:Pathspec'autoload_classmap.php'在submodule'module/CocktailMakerModule'中

ufk*_*ufk 7 git

我的项目包含谷歌代码库.

我使用Git源代码控制.

似乎当我尝试从特定目录向git添加文件时,我收到以下错误:

fatal: Pathspec 'autoload_classmap.php' is in submodule 'module/CocktailMakerModule'
Run Code Online (Sandbox Code Playgroud)

现在我不是要添加一个子模块.我只是想给git添加一个目录!

我现在的结果是这个目录被提交为空.因此,当我尝试添加特定文件时,我收到上述错误消息.

我检查.git了那个目录中没有任何其他目录,所以我真的很困惑为什么会发生这种情况.

ufk*_*ufk 41

仍然不知道它是如何发生的.我读过的所有文档都假设我有一个.git目录,但我没有.

我刚刚做了以下事情:

git rm -rf --cached CocktailMakerModule/
git add CocktailMakerModule/
Run Code Online (Sandbox Code Playgroud)

这似乎解决了这个问题.