git的时候提示 this submodule has modified changes.Those changes must bu committed inside of the submod... 这个提示意味着你的Git仓库中包含了子模块(submodule),而这个子模块有修改但还没有被提交。在Git中,子模块是一个独立的仓库,被包含在一个更大的父仓库中。父仓库通过特定的提交来追踪子模块的状态。
Make changes to submodule 当我们执行git submodule update命令来获取submodule中最新的内容,此时submodule处于"detached HEAD"状态,即本地没有working branch来记录这些更改,因此这些更改不能commit。我们首先需要在submodule中checkout一个working branch,然后更改submodule,最后执行git submodule update --remote --merge/-...
提交submodule 我们在project-main下,git status发现,多出来的是.gitmodules和文件夹project-sub-1,我们将它们视为普通的文件,提交并推送到远程。 anders@ubuntu:~/repo/project-main$ git status On branch master No commits yet Changes to be committed: (use "git rm --cached <file>..." to unstage) ...
Changes not stagedfor commit: (use"git add <file>..."toupdate what willbe committed) (use"git checkout -- <file>..."to discardchanges in working directory) modified: child (new commits)nochanges addedto commit (use"git add"and/or"git commit -a") 这里可以看到明显的提示,在项目有一个...
3. Easily identify changes in Submodules If your dependency is one you make changes to, either because it’s yours or you have your own custom fork, it’s handy to be able to make changes here, within your own project context, but for the changes to be sent to the shared dependency ...
fatal: Path 'xxxxxxx/*' is in submodule '/xxxxxxx' [demo@xxx]$ git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: xxxxxxx # # Untracked files: # (use "git add <file>..." to include in what will be committe...
allow adding an otherwise ignored submodule path. When running deinit the submodule working trees will be removed even if they contain local changes. When running update (only effective with the checkout procedure), throw away local changes in submodules when switching to a different commit; and ...
记录引用Submodule的commit id 在project1中push之后其实就是更新了引用的commit id,然后project1-b在clone的时候获取到了submodule的commit id,然后当执行git submodule update的时候git就根据gitlink获取submodule的commit id,最后获取submodule的文件,所以clone之后不在任何分支上;但是master分支的commit id和HEAD保持一致...
(use "git restore <file>..." to discard changes in working directory) deleted: .gitmodules Untracked files: (use "git add <file>..." to include in what will be committed) BlueSTSDK/ gitmodules 的内容 > cat .gitmodules [submodule "BlueSTSDK"] ...
git submodule add [subrepo url] 运行git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: .gitmodules new file: subrepo 接着添加 submodule1,并指定路径 git submodule add [subrepo1 url] ./module/module1 ...