从分支中删除Git子模块 [英] Remove Git submodule from branch

查看:108
本文介绍了从分支中删除Git子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在一个分支上有一个子模块,而不是在另一个分支上?是否可以在特定分支上删除子模块,但在其他分支上删除它?或仅将子模块添加到实验分支.

Is there a posssiblity to have a submodule on one branch and not to have it on another? Is it possible to remove a submodule on a specific branch but to have it on other branches? Or add a submodule to experimental branch only.

推荐答案

您的子模块由.gitmodules文件定义,该文件只是存储库中的另一个文件,与其他版本一样.因此,如果您在分支中更改它,则它也已更改.因此,您所有的问题都可以回答是".

Your submodules are defined by your .gitmodules file, which is just another file in your repository, version like everything else. So if you change it in a branch, it's changed. Thus, all your questions can be answered 'yes'.

这篇关于从分支中删除Git子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆