Commit 33a6b90b authored by 李晓静's avatar 李晓静
parents 75d39d62 3877dbac
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
## 子模块的添加 ## 子模块的添加
* 本厂库作为主项目的submodule使用,在使用时,在项目中规范使用submodule目录作为该子模块的根目录 * 本厂库作为主项目的submodule使用,在使用时,在项目中规范使用submodule目录作为该子模块的根目录
* 切换至项目根目录 * 切换至项目根目录
* git submodule add <submoduleURL> <submodulePATH> 我们约定 'git submodule add http://apollo.mttop.cn/gitlab/web_component/submodule.git src/submodule' * git submodule add <submoduleURL> <submodulePATH> 我们约定 'git submodule add http://apollo.mttopgroup.cn/gitlab/web_component/submodule.git src/submodule'
* 执行成功后 git status会看到项目中修改了.gitmodules,并增加了一个新文件(为刚刚添加的路径)即src下多了一个submodule的文件 * 执行成功后 git status会看到项目中修改了.gitmodules,并增加了一个新文件(为刚刚添加的路径)即src下多了一个submodule的文件
* git diff --cached查看修改内容可以看到增加了子模块,并且新文件下为子模块的提交hash摘要 * git diff --cached查看修改内容可以看到增加了子模块,并且新文件下为子模块的提交hash摘要
* git commit提交即完成子模块的添加 * git commit提交即完成子模块的添加
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment