使用选定的分支将SVN迁移到GitHub

时间:2019-11-04 21:03:01

标签: git git-svn

我想将项目从SVN迁移到GitHub。

SVN项目的结构为:

Project URL
    trunk
        application1
        application2
        application3
    branches
        version1.0
            application1
            application2
            application3
        version2.0
            application1
            application2
            application3
        version3.0
            application1
            application2
            application3
        version4.0
            application1
            application2
            application3

我想在GitHub上拥有四个文件夹:

application1
    master 
    version1.0
    version2.0
    version3.0
    version4.0
application2
    master 
    version1.0
    version2.0
    version3.0
    version4.0
application3
    master 
    version1.0
    version2.0
    version3.0
    version4.0
application4
    master 
    version1.0
    version2.0
    version3.0
    version4.0

我尝试使用命令(对于一个应用程序):

git svn clone --username $username  --trunk=trunk/application1                  
      --branches=braches/version1/application1    --branches=braches/version2/application1   --branches=braches/version3/application1  
--branches=braches/version4/application1 
 --authors-file=authors_modified.txt  $svnURL   application1    --no-metadata`

但是我得到了错误

W: Ignoring error from SVN, path probably does not exist: (160013): 
Filesystem has no item: File not found: revision 100, path '/branches'
W: Do not be alarmed at the above message git-svn
 is just searching aggressively for old history.

如果这种迁移可行,那么,这是怎么了?

1 个答案:

答案 0 :(得分:1)

  1. 使用SubGit而不是git-svn转换复杂的树
  2. 一次完成每个应用的转换,而不是一步步完成