Git submodule Add add project dependency Module
Add sub-modules to the project root directory
$ CD demo_project $ git submodule add git: // github.com/felixge/node-mysql.git deps/MySQL $ git submodule init $ git submodule update # submit changes
Git submodule init and update can directly obtain the dependency module.
$ Git submodule initsubmodule 'deps/connect '(GIT: // github.com/senchalabs/connect.git) registered for path 'deps/connect 'submodule' deps/connect-form' (GIT: // Connect) registered for path 'deps/connect-form' submodule 'deps/Express '(GIT: // github.com/visionmedia/express.git) registered for path 'deps/Express' submodule 'deps/formidable '(GIT: // github.com/felixge/node-formidable.git) registered for path 'deps/formidable 'submodule 'deps/jqtpl '(GIT: // github.com/kof/node-jqtpl.git) registered for path 'deps/jqtpl 'submodule' deps/MIME '(GIT: // github.com/bentomas/node-mime.git) registered for path 'deps/MIME 'submodule' deps/mysql' (GIT: // github.com/felixge/node-mysql.git) registered for path 'deps/mysql' submodule 'deps/node-Weibo '(GIT: // github.com/fengmk2/node-weibo.git) registered for path 'deps/node-Weibo 'submodule 'deps/nodeunit' (GIT: // github.com/caolan/nodeunit.git) registered for path 'deps/nodeunit 'submodule 'deps/QS' (GIT: // outputs) registered for path 'deps/QS '$ git submodule includeps/connect (1.3.0) includeps/connect-form (0.2.1) includeps/Express (2.2.1-6-g961146a) includeps/formidable (v0.9.11-2-g5d98e9c) includeps/jqtpl (heads/master) includeps/MIME (heads/master) includeps/MySQL (v0.9.1-2-g0790eba) includeps/node-Weibo (heads/master) includeps/nodeunit (0.4.0-60-g121df84) includeps/QS (0.0.7-1-g534b703)
Love
Hope this article will be useful to you ^_^