























bash
git submodule add git@gitlab.com:cndevops/ci/components.git
git add .
git commit -m "init"
git push --set-upstream origin feature-submodulebash
git clone git@gitlab.com:cndevops/gitlab-pipeline-examples/demo-pipeline.git
cd demo-pipeline
git checkout feature-submodule
## 注意区别! ##
## 初始化并拉取子模块内容
git submodule update --init
## 更新子模块,该命令会将子模块的 HEAD 指针更新为远程分支的最新提交。
git submodule update --remote
## 返回初始提交的内容
git submodule update --init --recursiveIDEA系列好像有个bug,检测不到submodule的变更,需要执行下菜单栏 git-update project
git submodule sync --init:
git submodule update --init:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。