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
Github git子模块未显示最新提交_Github - Fatal编程技术网

Github git子模块未显示最新提交

Github git子模块未显示最新提交,github,Github,我有一些应用程序,所有的应用程序都在git repo和子模块中。我通过这个命令添加了这些repo git submodule add https://github.com/rahmanshaber/about 我遇到了一些问题 1.当我单击子模块时,它会在添加时显示旧的提交。我想要子模块的最新提交 2.当我克隆SuperREOP(所有应用程序都作为子模块)时,它只下载文件夹。然后我输入命令下载子模块,我得到了这个错误 git submodule update --init --recursiv

我有一些应用程序,所有的应用程序都在git repo和子模块中。我通过这个命令添加了这些repo

git submodule add https://github.com/rahmanshaber/about
我遇到了一些问题

1.当我单击子模块时,它会在添加时显示旧的提交。我想要子模块的最新提交

2.当我克隆SuperREOP(所有应用程序都作为子模块)时,它只下载文件夹。然后我输入命令下载子模块,我得到了这个错误

git submodule update --init --recursive
fatal: not a git repository (or any of the parent directories): .git

这是gihub

我找到了这两种解决方案

  • 添加时,它将显示提交。我必须通过此命令手动将所有更新为最新提交 每个git pull源主机的git子模块
  • 2.我得到这个错误是因为我没有把命令放在下载的repo文件夹上。我把命令放在它外面


    谢谢。

    子模块本身不会自动更新到最新的提交,您需要明确要求它签出不同的提交或拉取,或任何以不同提交结束的内容。原因是父git存储库跟踪您签出的特定提交。