是否可以添加您在本地修改但您不是其所有者的 git 子模块,因此无法推送到远程。目前我的 repo 只添加了一个指向原始子模块的链接,但没有我对它的修改。但我希望将包括我的修改在内的全部内容推送到我的远程仓库。
到目前为止,我做了以下事情:
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")