是否可以添加您修改了本地设置但您不是所有者的git子模块,因此无法推送到远程。 目前,我的存储库仅添加了指向原始子模块的链接,但没有对其进行修改。 但是我希望将包括修改内容的全部内容推送到我的远程仓库中。
到目前为止,我做了以下事情:
cd my_repo
git submodule add git@mygithost:submodulue submodule
git submodule init && git submodule update
cd submodule
<changes,hacks>
git commit -am 'modify submodule'
cd .. && git status
> On branch master
Your branch is up to date with 'origin/master'.
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: submodule (untracked content)
no changes added to commit (use "git add" and/or "git commit -a")