Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 多个项目,每个项目具有主干/分支/标记_Git_Svn_Version Control_Git Svn_Git Branch - Fatal编程技术网

Git 多个项目,每个项目具有主干/分支/标记

Git 多个项目,每个项目具有主干/分支/标记,git,svn,version-control,git-svn,git-branch,Git,Svn,Version Control,Git Svn,Git Branch,我开始一个新的项目,我只有一个SVN服务器可用。在对SVN进行了一些研究之后,我发现我的项目的最佳存储库结构如下: /ProjectMain /trunk /branches /tags /ProjectAnnex # will not be branched /trunk /branches /tags /Documentation /trunk /branches /tags /Research

我开始一个新的项目,我只有一个SVN服务器可用。在对SVN进行了一些研究之后,我发现我的项目的最佳存储库结构如下:

/ProjectMain
    /trunk
    /branches
    /tags

/ProjectAnnex    # will not be branched
    /trunk
    /branches
    /tags

/Documentation
    /trunk
    /branches
    /tags

/Research        # will not be branched
    /trunk
    /branches
    /tags
因为我将有多个无关的项目和文件。然而,我不喜欢使用SVN,通过Git SVN使用Git会感觉舒服得多

如何使用
git svn clone
或通过编辑我的
.git/config
文件导入现有的回购协议?我看到可以在fetch/branchs/tags配置参数中使用通配符,但是如何在路径的开头使用它们

当我从
主干分支时,分支过程将如何发生?分支如何正确存储在各个
分支
文件夹中

如果您认为这种结构过于繁琐,您更愿意提出什么建议

提前感谢您的宝贵帮助,
Franck

我认为每个项目都应该使用不同的git存储库。否则,您的所有分支和标记都将混合在一起,这可能不是您所需要的。所以,使用

git svn clone --stdlayout http://example.com/path/to/ProjectMain
对于您的第一个项目

git svn clone --stdlayout http://example.com/path/to/ProjectAnnex

对于第二个,依此类推。

说得好!我是否应该使用git svn clone--stdlayout http…
,因为每个项目都有自己的trunk/branch/tags文件夹?最后,我是否会有问题w.r.t.
git svn
linear history?谢谢@是的,你应该。我在答案上加了这个。这样,git svn应该正确地提取各个分支的历史记录。太棒了,谢谢。还有,有没有一种方法可以同时
更新
提交
每个存储库中的所有更改?@frankstudiescompig您可以为此编写一个脚本,但每次git提交都会导致单独的svn提交。我相信这会使历史更加清晰!谢谢你,埃夫根尼,你的快速回答!