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 ...
git submodule foreach git submodule update 修改Submodule 有些时候你需要对submodule做一些修改,很常见的做法就是切到submodule的目录,然后做修改,然后commit和push。 这里的坑在于,默认git submodule update并不会将submodule切到任何branch, 所以,默认下submodule的HEAD是处于游离状态的(‘detached HEAD’ state)。 所...
同时我们看到,红框处是在主模块里提交子模块是的commit信息(record submodule change) 增删submodule 我们知道,submodule是记录在主项目根目录下的.gitmodule文件里的,直接修改该文件么,肯定是不行的,实测真的不行,还是要按官方标准方式来。 以TVM项目为例,其3rdparty里有大量的开源依赖库,github.com/apache/tvm 当...
3.2、修改 submodule 的坑: 默认git submodule update 并不会将 submodule 切到任何 branch,所以,默认下 submodule 的 HEAD 是处于游离状态的 (‘detached HEAD’ state)。所以在修改前,记得一定要用 git checkout master 将当前的 submodule 分支切换到 master,然后才能做修改和提交。 如果你不慎忘记切换到 master...
[submodule"submods/newtestrepo"] path= submods/newtestrepo url= https://github.com/cnweibo/newtestrepo.git 注意:在1.8版本git之前,上述命令必须在preop的root目录下执行! 2.执行git status,则发现有两个变更需要commit (newcnweibo_branch)*$ git status ...
这里的坑在于,默认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)操作相关命令 ...
这里的坑在于,默认 git submodule update 并不会将 submodule 切到任何 branch,所以,默认下 submodule 的 HEAD 是处于游离状态的 (‘detached HEAD’ state)。所以在修改前,记得一定要用 git checkout master 将当前的 submodule 分支切换到 master,然后才能做修改和提交。
[--] <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[--...