Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 将我的更改保留在一个子模块中_Git_Github_Git Submodules - Fatal编程技术网

Git 将我的更改保留在一个子模块中

Git 将我的更改保留在一个子模块中,git,github,git-submodules,Git,Github,Git Submodules,假设我有一个子模块,它是从Github repo克隆的,我无法推到它。我对这个子模块进行更改并在本地提交它们 现在,我将包含子模块的repo推送到我的Github帐户,以便其他人可以从中克隆。但我也希望其他人看到/使用我对子模块的提交。 当我推我的回购协议时,对子模块的提交不知何故没有被推,我想知道这应该如何工作。每当有人从我的repo克隆时,他们都会得到子模块作者的最后一次提交,而不是我的提交 我必须做些什么才能使这项工作顺利进行 否,这将不起作用,因为您无法在一个git存储库中创建git存储

假设我有一个子模块,它是从Github repo克隆的,我无法推到它。我对这个子模块进行更改并在本地提交它们

现在,我将包含子模块的repo推送到我的Github帐户,以便其他人可以从中克隆。但我也希望其他人看到/使用我对子模块的提交。 当我推我的回购协议时,对子模块的提交不知何故没有被推,我想知道这应该如何工作。每当有人从我的repo克隆时,他们都会得到子模块作者的最后一次提交,而不是我的提交


我必须做些什么才能使这项工作顺利进行

否,这将不起作用,因为您无法在一个git存储库中创建git存储库。这意味着您不能将两个不同的存储库提交发布到另一个git存储库中