如何将GIT subsodule添加到父仓库的特定分支?
假设我有一个有两个分支的存储库:main
和功能
。现在,我希望我的功能
分支将另一个存储库作为子模块,但我希望该子模块仅在该功能
分支分支不到main 分支。 我已经尝试过:
- 切换到
功能
分支 - 将我的子模块添加
- 回到
main
分支,但是这里的子模块仍然可见,我不想要。
怎么可能?
Say i have a repo that has two branches: main
and feature
. Now i want my feature
branch to depend on another repo as a submodule but i want that submodule to be visible only to that feature
branch not to the main
branch.
I have already tried:
- switch to
feature
branch - add my submodule there
- switch back to
main
branch, but here the submodule remains visible which i don't want.
How is it possible ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论