How to combine multiple svn trunk sub-tree into one git-svn repository?

与世无争的帅哥 提交于 2019-12-08 07:17:12

问题


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

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

And the layout will be

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

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/...

回答1:


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

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

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.



来源:https://stackoverflow.com/questions/53000369/how-to-combine-multiple-svn-trunk-sub-tree-into-one-git-svn-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!