我刚刚运行了一个git diff,我得到了所有大约10个子模块的以下输出
diff --git a/.vim/bundle/bufexplorer b/.vim/bundle/bufexplorer
--- a/.vim/bundle/bufexplorer
+++ b/.vim/bundle/bufexplorer
@@ -1 +1 @@
-Subproject commit 8c75e65b647238febd0257658b150f717a136359
+Subproject commit 8c75e65b647238febd0257658b150f717a136359-dirty
Run Code Online (Sandbox Code Playgroud)
这是什么意思?我如何解决它?
我有一个元项目,其中包含许多子模块。我想在某种 foreach 循环中运行以下几行。
cd $subDirectory
"\n\nModule $subDirextory" >> log
git log --pretty=format:"%h%x09%an%x09%ad%x09%s" origin/${Branch}..HEAD >> log
cd ..
Run Code Online (Sandbox Code Playgroud)
这个想法是为元存储库中的每个子模块获取从最后一个分支点到 HEAD 的日志。我该怎么做呢?
我有一个带有单个子模块的 git 存储库sub/x。(该子模块不包含其自己的任何子模块。)
在超级项目的存储库中, 的输出git status显示以下(未暂存的)修改
modified: sub/x (new commits)
Run Code Online (Sandbox Code Playgroud)
如果我现在跑步
git submodule update
Run Code Online (Sandbox Code Playgroud)
...在超级项目上,以下行被打印到终端(仅此而已):
Skipping submodule 'sub/x'
Run Code Online (Sandbox Code Playgroud)
此后,git status超级项目的输出保持如上所示,没有变化。
(如果我添加--init到git submodule update命令中,则同上。)
问:如何确定git submodule update [--init]跳过sub/x子模块的原因?