Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.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
从SVN multi-repo迁移到GIT_Git_Svn_Git Svn - Fatal编程技术网

从SVN multi-repo迁移到GIT

从SVN multi-repo迁移到GIT,git,svn,git-svn,Git,Svn,Git Svn,我是git svn bridge的新手,面临着从svn repo迁移到git的任务。SVN结构看起来非常糟糕: root base server core branch tags trunk webapp branch tags trunk .... client core branch

我是git svn bridge的新手,面临着从svn repo迁移到git的任务。SVN结构看起来非常糟糕:

root
  base
    server
      core
         branch
         tags
         trunk
      webapp
         branch
         tags
         trunk
       ....
    client
      core
         branch
         tags
         trunk
      ....
    ....
  ....
作为一名“天才svn迁移大师”,我执行了
git svn clone..../root
并克隆了整个存储库。我没有GIT可见的分支:

$git分支-a
*主人
遥控器/git svn

我可以很容易地导航到
root-base-server-core-branch-my-awesome-branch
,它看起来像普通文件夹


如何继续svn2git对话?看起来我应该从头开始,但克隆这个邪恶花了一个星期,我不想再等了…

你有多个svn项目。您想在git中合并它们吗? 您可能需要考虑为客户端、核心和webapp创建一个单独的git存储库

查看git svn clone的
--分支
,它可以使用多个通配符,而这种糟糕的svn结构可能需要这些通配符。类似于
--branchs=*/*/*/*/branch/*

您还可以使用多个
--branchs
,如
--branchs=cocked/out/path/branch/*--branchs=total/messed/up/path/branchs/*

从帮助中:

-T,--trunk=,-T,--tags=,-b,
--分支=,-s,--stdlayout
这些是init的可选命令行选项。这些标志中的每一个都可以指向相对的存储库路径
(-tags=项目/标记)或完整url(--tags)=https://foo.org/project/tags). 您可以指定多个--tags和/或
--分支选项,以防Subversion存储库在多个路径下放置标记或分支。选择权
--stdlayout是一种将主干、标记、分支设置为相对路径的简写方法,这是Subversion的默认设置。如果
任何其他选项也会给出,它们优先。
       -T<trunk_subdir>, --trunk=<trunk_subdir>, -t<tags_subdir>, --tags=<tags_subdir>, -b<branches_subdir>,
       --branches=<branches_subdir>, -s, --stdlayout
           These are optional command-line options for init. Each of these flags can point to a relative repository path
           (--tags=project/tags) or a full url (--tags=https://foo.org/project/tags). You can specify more than one --tags and/or
           --branches options, in case your Subversion repository places tags or branches under multiple paths. The option
           --stdlayout is a shorthand way of setting trunk,tags,branches as the relative paths, which is the Subversion default. If
           any of the other options are given as well, they take precedence.