如何将多个svn中继子树合并到一个git-svn存储库中? [英] How to combine multiple svn trunk sub-tree into one git-svn repository?

查看:77
本文介绍了如何将多个svn中继子树合并到一个git-svn存储库中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用git-svn同步svn存储库. svn信息库的布局是

I want to use git-svn to sync svn repository. The svn repository layout is

svn/prjA/trunk
svn/prjA/branches
svn/prjB/trunk
svn/prjB/branches

使用以下命令将分成两个git存储库.

Use the following commands will separate into two git repository.

git svn clone https://host/svn/prjA/trunk prjA
git svn clone https://host/svn/prjB/trunk prjB

布局将是

prjA/.git
prjA/...
prjB/.git
prjB/...

是否有可能将它们合并到一个git存储库中并同步到svn的两个子目录? 预期的布局如下:

If it possible to combine these into one git repository and sync to two sub-directories of svn? And the expected layout like following:

.git
prjA/...
prjB/...

推荐答案

应该可以将多个Git存储库合并在一起,例如"组合多个git存储库"

It should be possible to merge multiple Git repositories together, as in "Combining multiple git repositories"

但这不会给你一个git-svn仓库,只有一个Git仓库,没有更多链接可以回到那些最初的Subversion仓库.

But that won't give you a git-svn repo, only a Git one with no more link back to those initial Subversion repository.

因此,将它们分开(并与父仓库和符号链接一起使用)仍然是最安全的方法,只要您希望从这些Git存储库之一到其对应的Subversions引用,就可以保持git-svn dcommit的能力.

So keeping them separate (and work with a parent repo and symlinks for instance) remains the safest way to keep the ability to git-svn dcommit whenever you want from one of those Git repositories to their corresponding Subversions referentials.

这篇关于如何将多个svn中继子树合并到一个git-svn存储库中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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