Sicherheitshalber solltest dugit submodule updatemit dem--initFlag ausführen. Für den Fall, dass das Hauptprojekt einen Commit durchführt, bei dem du gerade neue Submodule hinzugefügt hast. Wenn ein Submodul verschachtelte Submodule enthält, solltest du das--recursiveFlag setzen. Wenn du ...
通过上述示例,我们可以看到Git update submodules的过程包括添加submodule、初始化submodule和更新submodule。通过熟练运用Git update submodules,我们可以更加高效地管理和同步代码库,从而提高开发效率和代码质量。 总之,理解Git updating submodules的过程对我们掌握Git的高级特性和有效管理代码库至关重要。通过熟练运用Git upd...
你必须运行两个命令:git submodule init用来初始化本地配置文件,而git submodule update则从该项目中抓取所有数据并检出父项目中列出的合适的提交。 $ git submodule init Submodule'DbConnector'(https://github.com/chaconinc/DbConnector) registered for path 'DbConnector'$ git submodule update Cloning into'DbC...
#克隆父模块git clone <repo>#初始化子模块git submodule init#抓取所有数据并检出父项目中列出的合适的提交git submodule update 方式三 如果你已经克隆了项目但忘记了--recurse-submodules,那么可以运行git submodule update --init将git submodule init和git submodule update合并成一步。 如果还要初始化、抓取并检出...
在project1中push之后其实就是更新了引用的commit id,然后project1-b在clone的时候获取到了submodule的commit id,然后当执行git submodule update的时候git就根据gitlink获取submodule的commit id,最后获取submodule的文件,所以clone之后不在任何分支上;但是master分支的commit id和HEAD保持一致。 查看~/submd/ws/project1...
Updating files: 100% (1009/1009), done. Submodule 'binutils' (https://sourceware.org/git/binutils-gdb.git) registered for path 'binutils' Submodule 'dejagnu' (https://git.savannah.gnu.org/git/dejagnu.git) registered for path 'dejagnu' Submodule 'gcc' (https://gcc.gnu.org/git/gcc.git...
0x03 优雅地修改Submodule为SSH 配置完ssh key,我们可以通过ssh来git clone代码库了,但这只解决了一部分问题。因为,很多repo有第三方依赖,这些依赖大多数以submodule的形式保存在.gitmodules中,而且大概率是https的方式。于是,哪怕你通过ssh成功clone了repo,它的submodules依然能让你头大。手动一个个改submodules的ht...
Updating Submodules There is an aspect about submodules that some may not realize when first working with Git submodules. When you add the submodule, the most recent commit of the submodule is stored in the main repository’s index. That means that as the code in the submodule’s repository...
git config-f.gitmodules submodule.[submodule-name].branch[branch-name] 如果不用 -f .gitmodules 选项,那么它只会为你做修改。但是在仓库中保留跟踪信息更有意义一些,因为其他人也可以得到同样的效果。 https://blog.csdn.net/weixin_44070450/article/details/107701812 ...
$ git submodule update --remote xxx // 指定需要同步的子模块 子模块目录下更新: git pull 默认情况下会跟踪子模块的 master 分支,设置为其他分支: a. .gitmodules 设置 git config -f .gitmodules submodule.[submodule-name].branch [branch-name] ...