工作开发场景:
![包含有gitmodule的模块.png](http://upload-images.jianshu.io/upload_images/2577413-cd424e7e32d6d6b0.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
使用gitlab进行版本控制开发工作,对git的使用并不是知道的很多,第一次把项目整个gitclone 下来,但是死活git clone不了子模块里面的代码,这里做下挖坑记录总结
子模块gitlab路径
![git module.png](http://upload-images.jianshu.io/upload_images/2577413-42542a5f967bed06.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
在项目中添加子模块命令:
git submodule add [address]
子项目一起clone下来:
git clone --recursive [address]
子项目初始化:
git submodule update --init --recursive
子项目更新:
git submodule foreach --recursive git checkout master
git submodule foreach git pull
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)