git submodule .gitmodules 子模块
-
初始化
git submodule init -
添加子项目
git submodule add -b xxxx {path}-b 指定分支 path 可为空
- (不知为何, 直接写在 .gitmodules 或者 .git/config 中编辑 无效, 必须使用 命令行才可以)
-
设置子模块分支
git submodule set-branch -b develop {path} -
克隆项目
-
git clone --recursive xxxx(克隆并初始化子模块)
-
-
# 初始化方式 2 git clone xxx cd xxx git submodule update --init
-

浙公网安备 33010602011771号