git 添加子模块

参考:https://www.jianshu.com/p/10ae453701ed

 

问题:如果一个子模块的分支不是最新的该怎么处理?

方法:在主仓库内使用 cd 命令切换到子模块的仓库,使用 git pull 拉取最新提交,如果想切换到其他分支,可以使用 checkout 调整

拉取完之后,再切回到主仓库里,使用 git commit 提交修改后 push 即可

 

posted @ 2023-07-14 10:35  strive-sun  阅读(35)  评论(0编辑  收藏  举报