git submodule 依赖模块更新

git submodule add 添加项目的依赖模块

在项目的根目录添加子模块

$ cd demo_project
$ git submodule add git
://github.com/felixge/node-mysql.git deps/mysql
$ git submodule init
$ git submodule update
# 提交更改


另外,如果依赖模块只是一个git下面的某个目录,一般不要这样做

http://chrisjean.com/2009/04/20/git-submodules-adding-using-removing-and-updating/
http://www.kafeitu.me/git/2012/03/27/git-submodule.html

参看:
如何把一个工程中的某个目录添加为git submodule
http://segmentfault.com/q/1010000000155212
原文地址:https://www.cnblogs.com/shadow21/p/3220074.html