git子模块未显示最新提交

时间:2018-08-21 08:48:57

标签: github

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

git submodule add https://github.com/rahmanshaber/about

我遇到了一些问题。

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

2。当我克隆超级仓库(所有应用程序都作为子模块)时,它仅下载文件夹。然后我使用命令来下载子模块,出现此错误

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

这是gihub page

1 个答案:

答案 0 :(得分:0)

我找到了两种解决方案。

  1. 添加时将显示提交。我必须通过此命令手动将所有内容更新为最新提交 git submodule foreach git pull origin master

2.i我收到此错误,因为我没有将命令放在下载的repo文件夹中。我正在将命令放入其中。

谢谢。

相关问题