在git-svn项目中使用git子模块 [英] Using git submodules in a git-svn project

查看:166
本文介绍了在git-svn项目中使用git子模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我们的git-svn托管项目中,我们有3个上游项目都保存在GitHub上的本地git存储库中。由于这些上游项目的源代码是在我们的控制之下并且经常发生变化,所以我们目前的解决方案,即每次修改内容时将构建工件重新部署到超级项目中都是非常麻烦的。

In our git-svn managed project, we have 3 upstream projects that are all kept in native git repositories on GitHub. Since the source code of those upstream projects is under our control and changes frequently, our current solution, namely re-deploying the build artifacts to the super-project everytime we change something is quite cumbersome.

我想要的是:

What I'd like to have is this:

parent project (git-svn):
    --> submodule 1 (git)
    --> submodule 2 (git)
    --> submodule 3 (git)

通过这种方式,子模块1-3的源代码与超级项目的来源,但我可以分别推动对子模块的更改。

That way, the source code for submodules 1-3 is compiled along with the sources for the super project, but I can push changes to submodules separately.

问题是:当我 git svn dcommit 在父项目上?这甚至工作吗?

The question is: what happens when I git svn dcommit on the parent project? Does this even work?

更新
嗯,我只是设置了一个简单的项目结构,试图类似于这种情况,尝试对超级项目执行dcommit时收到此错误消息:

UPDATE Hm, I just set up a simple project structure, trying to resemble this scenario, and I receive this error message when trying to dcommit on the superproject:

a0301b11f3544a1e71067ff270eded65e4c8afbd doesn't exist in the repository at /opt/local/libexec/git-core/git-svn line 4775
Failed to read object a0301b11f3544a1e71067ff270eded65e4c8afbd at /opt/local/libexec/git-core/git-svn line 574

任何想法/建议?

Any ideas/suggestions?

推荐答案

t做到这一点,git子模块不能通过git-svn上传到svn仓库,它不支持这一点。

You can't do this, git submodules can't be pushed upstream into a svn repository via git-svn, it doesn't support this.

这篇关于在git-svn项目中使用git子模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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