请建议另一种将SVN存储库迁移到GIT存储库的最快方法

时间:2015-07-27 12:10:33

标签: ruby git svn git-svn svn2git

下载适用于Windows的Ruby安装程序,并在路径中安装了添加Ruby可执行文件的最新版本。

已安装svn2git

开始菜单 - >所有程序 - > Ruby - >用ruby启动命令提示符 然后输入“gem install svn2git”并输入。

迁移subversion存储库

Ruby命令提示符下,转到要迁移的文件的目录

然后使用以下命令

  

svn2git http://[domain name]/svn/ [repository root]

将20K提交迁移到GIT大约需要2天,在SVN中我们提交了大约65K次提交。

请告诉我有没有其他最快的方式将SVN存储库迁移到GIT存储库。

2 个答案:

答案 0 :(得分:0)

你可以试试github导入器:

https://help.github.com/articles/importing-from-subversion/

我没有关于速度的任何信息。

答案 1 :(得分:0)

不确定Sub CopyPaste() Dim wrkBkTarget As Workbook, wrkShtTarget As Worksheet Dim wrkBkSource As Workbook, wrkShtSource As Worksheet Dim rLastCellSrc As Range, rLastCellTgt As Range 'Update these to reference your workbooks. 'If both sheets are in the workbook containing this code then 'you can remove these references - just set each worksheet reference to ThisWorkbook Set wrkBkTarget = ThisWorkbook Set wrkBkSource = ThisWorkbook 'Update to reference your worksheets. Set wrkShtTarget = wrkBkTarget.Worksheets("Input DATA") Set wrkShtSource = wrkBkSource.Worksheets("SAP Output DATA") Set rLastCellTgt = LastCell(wrkShtTarget) Set rLastCellSrc = LastCell(wrkShtSource) 'First sort the target sheet and find the new last cell. 'Sorts on column A. With wrkShtTarget .Sort.SortFields.Add Key:=.Range(.Cells(1, 1), .Cells(rLastCellTgt.Row, 1)), Order:=xlAscending With .Sort .SetRange wrkShtTarget.Range(wrkShtTarget.Cells(1, 1), rLastCellTgt) .Header = xlYes .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End With 'Find the new last cell - you need to paste on next row down. Set rLastCellTgt = LastCell(wrkShtTarget) 'Now copy the new data to the bottom of the dataset. With wrkShtSource .Range(.Cells(2, 1), rLastCellSrc).Copy _ Destination:=wrkShtTarget.Cells(rLastCellTgt.Row + 1, 1) End With End Sub 'Returns a reference to the last cell on the sheet - useful in most projects. Public Function LastCell(wrkSht As Worksheet, Optional Col As Long = 0) As Range Dim lLastCol As Long, lLastRow As Long On Error Resume Next With wrkSht If Col = 0 Then lLastCol = .Cells.Find("*", , , , xlByColumns, xlPrevious).Column lLastRow = .Cells.Find("*", , , , xlByRows, xlPrevious).Row Else lLastCol = .Cells.Find("*", , , , xlByColumns, xlPrevious).Column lLastRow = .Columns(Col).Find("*", , , , xlByColumns, xlPrevious).Row End If If lLastCol = 0 Then lLastCol = 1 If lLastRow = 0 Then lLastRow = 1 Set LastCell = wrkSht.Cells(lLastRow, lLastCol) End With On Error GoTo 0 End Function 做了什么,但是使用标准svn2git我们注意到Windows机器上的速度非常慢,特别是在进行初始导入时非常烦人。有两种方法可以解决它:在macos / linux机器上执行导入,然后简单地将生成的repo复制到windows工作站或部分导入(git-svn)。