致命:Pathspec'autoload_classmap.php'位于子模块'module / CocktailMakerModule' [英] fatal: Pathspec 'autoload_classmap.php' is in submodule 'module/CocktailMakerModule'
问题描述
我使用Git源代码控制。
看来,当我尝试从一个特定的目录添加文件到git时,我得到以下错误:
fatal:Pathspec' autoload_classmap.php'在子模块'Module / CocktailMakerModule'中
现在我不想添加子模块。我只是想添加一个目录到git!
现在我得到的结果是这个目录是空的。因此,当我尝试添加特定文件时,我收到了上述错误消息。
我检查过,没有任何其他 .git
目录中,所以我真的很困惑,为什么会发生这种情况。
仍然不知道如何它发生了。我读过的所有文档都假设我有一个 .git
目录,但是我没有。
以下内容:
git rm -rf --cached CocktailMakerModule /
git add CocktailMakerModule /
这似乎解决了问题。
I have a repository on google code with my project.
I use Git source control.
It seems that when I try to add files to git from a specific directory, I get the following error:
fatal: Pathspec 'autoload_classmap.php' is in submodule 'module/CocktailMakerModule'
Now I'm not trying to add a submodule. I'm just trying to add a directory to git!
The result that I have now is that this directory is committed empty. So when I try to add specific files I get the above error message.
I checked and there isn't any other .git
directory in that directory, so I'm really confused to why this has happened.
Still no idea how it happened. All documentation I read assumes I have a .git
directory there but I don't.
I just did the following:
git rm -rf --cached CocktailMakerModule/
git add CocktailMakerModule/
That seems to resolve the issue.
这篇关于致命:Pathspec'autoload_classmap.php'位于子模块'module / CocktailMakerModule'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!