Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.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子模块:手动更改sha1_Git_Git Submodules - Fatal编程技术网

Git子模块:手动更改sha1

Git子模块:手动更改sha1,git,git-submodules,Git,Git Submodules,很简单,我有一个带有子模块的项目。在某个时刻,子模块中的更改没有被推送,而是超级项目被推送 现在,超级项目对子模块的sha-1引用指向服务器端不存在的提交,因此git无法更新子模块(错误:没有这样的远程引用8BA0033813718939726D7E9429BF3EABC52034D) 我只想将sha-1设置为其他值——但由于更新失败,我无法在子模块中使用git checkout…(这是每个类似问题的公认解决方案) 我试图探索.git/modules/。。。但是我找不到它存放的地方 如果您想了解

很简单,我有一个带有子模块的项目。在某个时刻,子模块中的更改没有被推送,而是超级项目被推送

现在,超级项目对子模块的sha-1引用指向服务器端不存在的提交,因此git无法更新子模块(
错误:没有这样的远程引用8BA0033813718939726D7E9429BF3EABC52034D

我只想将sha-1设置为其他值——但由于更新失败,我无法在子模块中使用
git checkout…
(这是每个类似问题的公认解决方案)

我试图探索.git/modules/。。。但是我找不到它存放的地方


如果您想了解有关项目结构的更多信息,可以找到项目和子模块。

即使子模块中的
git checkout master
不起作用,我还是设法让
git checkout[commit hash]
起作用,这就解决了问题