我无法将所做的更改推送到git子模块。我已经推送了主项目,并得到了以下信息:
mainProject$ git status
On branch myBranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: example/submod (modified content)
no changes added to commit (use "git add" and/or "git commit -a")
但是当我试图推送子模块中的更改时,出现了以下错误:
submod$ git status
On branch dev
Your branch is up-to-date with 'origin/dev'.
git --version 的输出结果是:
git version 1.9.3 (Apple Git-50)
当我运行时,
mainProject$ git diff example/submod
Submodule example/submod contains modified content
这里发生了什么?我也无法将主项目的更改添加进来。
mainProject$ git add example/submod
mainProject$ git status
On branch myBranch
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: example/submod (modified content)
no changes added to commit (use "git add" and/or "git commit -a")