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