Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.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_Git Submodules - Fatal编程技术网

git子模块更新-为什么从顶层更新

git子模块更新-为什么从顶层更新,git,git-submodules,Git,Git Submodules,我一直对此感到困惑: $ git submodule You need to run this command from the toplevel of the working tree. 为什么我需要从顶级目录运行它?这是一个技术原因,还是仅仅因为一个约定/可能的缺陷?注意:自git 1.8.4(2013年8月)以来,您不必在顶级运行git子模块更新 这是因为有一个新的--前缀选项 --prefix <arg> ——前缀

我一直对此感到困惑:

$ git submodule
You need to run this command from the toplevel of the working tree.
为什么我需要从顶级目录运行它?这是一个技术原因,还是仅仅因为一个约定/可能的缺陷?

注意:自git 1.8.4(2013年8月)以来,您不必在顶级运行git子模块更新

这是因为有一个新的
--前缀
选项

--prefix <arg>
——前缀