Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git子模块谈论不存在的文件夹 我在GITHUB的Git存储库中有一个C++项目,这个文件对于我来说不是本地的。我试着用命令删除它 git rm --cached -r foldername_Git_Github_Git Submodules - Fatal编程技术网

git子模块谈论不存在的文件夹 我在GITHUB的Git存储库中有一个C++项目,这个文件对于我来说不是本地的。我试着用命令删除它 git rm --cached -r foldername

git子模块谈论不存在的文件夹 我在GITHUB的Git存储库中有一个C++项目,这个文件对于我来说不是本地的。我试着用命令删除它 git rm --cached -r foldername,git,github,git-submodules,Git,Github,Git Submodules,但结果是 fatal: pathspec 'foldername' did not match any files 我还有一个子模块,我正试图用下面的命令初始化它 git submodule update --init --recursive 但它也会输出一些关于不存在的文件夹的信息 No submodule mapping found in .gitmodules for path 'foldername/anotherfolder' 我认为这是很久以前将一个带有git存储库的文件夹复

但结果是

fatal: pathspec 'foldername' did not match any files
我还有一个子模块,我正试图用下面的命令初始化它

git submodule update --init --recursive 
但它也会输出一些关于不存在的文件夹的信息

No submodule mapping found in .gitmodules for path 'foldername/anotherfolder'
我认为这是很久以前将一个带有git存储库的文件夹复制粘贴到此文件夹的结果,而没有将其初始化为子模块

有人有什么建议吗

编辑:因此我能够通过重新克隆目录并在所有假定的“子模块”上执行
git-rm foldername
和类似的
git rm-rf
来解决我的问题。但我还是希望有人能解释这里到底发生了什么