如何解决git push --recurse-submodules=check 推送到远程,即使有子模块在他们的远程之前
我有以下文件夹结构
-outerRepo
-innerRepo
-innerRepo2
-innerRepo3
其中 innerRepo
、innerRepo2
和 innerRepo3
是子模块。
当我运行 git submodule foreach git status
时,我得到以下输出
Entering 'innerRepo'
On branch master
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: stuff.html
Entering 'innerRepo2'
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit,working tree clean
Entering 'innerRepo3'
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit,working tree clean
据我所知,在 git push --recurse-submodules=check
should not push anything 内运行 outerRepo
,因为如 git submodule foreach git status
所示,有一些子模块提交在其远程版本中不可用.我应该首先推送子模块中的提交。但是,当我更改 outerRepo
中的文件并提交时,git push --recurse-submodules=check
仍会将文件推送到远程。这怎么可能?我正在运行 git version 2.30.1.windows.1
。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。