git - 子模块的添加与加载

添加子模块

# 首先进入到要添加子模块的模块路径
# 执行以下命令

git submodule add <submodule remote url>

加载子模块

# 使用如下两种方式可以加载子模块:
# 1. 在从remote克隆了带有子模块的模块之后,执行加载子模块的命令
git submodule init && git submodule update

# 2. 在拉取模块的同时加载子模块
git clone <remote url> --recursive

猜你喜欢

转载自blog.csdn.net/qq_39378657/article/details/114259436