其他分享
首页 > 其他分享> > git submodule subtree常用指令

git submodule subtree常用指令

作者:互联网

submodule

官方文档

添加

git submodule add -b master git@git.xxx:xxx/xxx.git src/xxx

删除

git submodule deinit -f src/xxx     // 取消注册
git rm -rf src/xxx                  // git 工作树和索引中删除文件
rm -rf .git/modules/src/xxx

subtree

带着提交记录来拷贝仓库的话就用subtree

git subtree add --prefix=src/xxx git@git.xxx:xxx/xxx.git master

 

标签:src,git,xxx,subtree,rf,submodule
来源: https://www.cnblogs.com/amiezhang/p/11354599.html