git commit -am "change_summary" # 提交submodule的commit#or#更新submodule源码,默认更新的branch是master,如果要修改branch,在.gitmodule中设置git submodule update --remote <submodule_name>#更新所有submodule源码,默认更新.gitmodule中设置的跟踪分支,未设置则跟踪mastergit submodule update --remote#当submodule ...
同时我们看到,红框处是在主模块里提交子模块是的commit信息(record submodule change) 增删submodule 我们知道,submodule是记录在主项目根目录下的.gitmodule文件里的,直接修改该文件么,肯定是不行的,实测真的不行,还是要按官方标准方式来。 以TVM项目为例,其3rdparty里有大量的开源依赖库,github.com/apache/tvm 当...
用git checkout master将 HEAD 从游离状态切换到 master 分支 , 这时候,git 会报 Warning 说有一个提交没有在 branch 上,记住这个提交的 change-id(假如 change-id 为 aaaa)。 用git cherry-pick aaaa来将刚刚的提交作用在 master 分支上。 用git push将更新提交到远程版本库中。 3.3、删除 submodule : 有...
添加子模块:$ git submodule add [url] [path] 如:$git submodule add git://github.com/soberh/ui-libs.git src/main/webapp/ui-libs 初始化子模块:$ git submodule init ---只在首次检出仓库时运行一次就行 更新子模块:$ git submodule update ---每次更新或切换分支后都需要运行一下 删除子模块:(分...
write bbbfornewbrancha,b,c,d 请注意--no-ff参数,表示禁用Fast forward模式。禁用Fast forward模式后合并会创建一个新的 commit,所以加上-m 参数,把描述写进去。 合并后,查看分支历史: 代码语言:javascript 代码运行次数:0 运行 AI代码解释 lighthouse@VM-8-10-ubuntu:gitcode$ git log--graph--pretty=one...
这里的坑在于,默认git submodule update并不会将submodule切到任何branch,所以,默认下submodule的HEAD是处于游离状态的(‘detached HEAD’ state)。所以在修改前,记得一定要用git checkout master将当前的submodule分支切换到master,然后才能做修改和提交。 如果你不慎忘记切换到master分支,又做了提交,可以用cherry-pick命...
Here we have changed directory to the awesomelibrary submodule. We have created a new text filenew_awesome.txtwith some content and we have added and committed this new file to the submodule. Now let us change directories back to the parent repository and review the current state of the pare...
Git pull 【remoteName】[localBranchName] #推送远程仓库: Git push 【remoteName】[localBranchName] #提交本地test 分支作为远程的master分支 Git push origin test:master #提交本地test 分支作为远程的test分支 Git push origin test:test 分支(branch)操作相关命令 ...
if the submodule commit used on one side of the merge is a descendant of the submodule commit used on the other side of the merge, Git attempts to fast-forward to the descendant. Otherwise, Git will treat this case as a conflict, suggesting as a resolution a submodule commit that is des...
[--] <path>…)git submodule[--quiet] update [<options>] [--] [<path>…]git submodule[--quiet] set-branch [<options>] [--] <path>git submodule[--quiet] set-url [--] <path> <newurl>git submodule[--quiet] summary [<options>] [--] [<path>…]git submodule[--...