一、添加submodule
克隆子项目到当前项目目录下 git submodule add https://github.com/maonx/vimwiki-assets.git submodule_filename
如果是希望克隆到项目下的指令路径,
git submodule add -b <branch> <remote> <path>
不指定分支就不传 -b <branch>
git submodule add -b 分支名 远程仓库名 项目下子目录
二、移除submodule
注销子模块
git submodule -f deinit llamacpp.cpmv
移除.gitsubmodule中的子模块。
删除 .git/config中的子模块定义
[remote "origin"]
url = git@codeup.aliyun.com:modelbest/phone/llamacpp/ModelbestApp_llamacpp_Android.git
fetch = +refs/heads/*:refs/remotes/origin/*
[pull]
rebase = true
ff = only
[branch "dev"]
remote = origin
merge = refs/heads/dev
[branch "dev_llm"]
remote = origin
merge = refs/heads/dev_llm