我有一个包含子模块的远程git存储库(repo A)。我已经分支了子模块引用的存储库,并且想要更新repo A.
我的问题是,如何更新我的项目,以便我的子模块指向我的远程分支,而不是主分区?
答案 0 :(得分:0)
这是两个步骤:
例如,第1步:
$ cd /some/project
$ cd vendor/foo
$ git fetch
$ git checkout origin/feature/awesome
第2步:
$ cd ..
git commit -v foo
< editor showing only the commit hash for the submodule changing >