SVN-Git迁移:clean-git分支错误

时间:2016-01-05 20:29:20

标签: git svn version-control git-svn

我正在关注SVN到Git migration guidegit svn clone没问题但是当我运行清理命令时我得到了这个错误,我甚至不确定这意味着什么。我该如何解决这个问题?

java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
Could not retrieve the config for the key: svn-remote.svn.branches

1 个答案:

答案 0 :(得分:7)

如果在运行--branches命令时未指定git svn clone,则会出现此问题。您可以通过在执行--branches时指定git svn clone来避免此问题,如下所示:

git svn clone --username=ArpitAggarwal --branches=/dev --authors-file=C:/Users/ArpitAggarwal/authors.txt http://localhost:81/svn/project/branches/ dev-git

如果您不想指定--branches,解决方法是在"branches"中添加空的.git/config密钥,如下所示:

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
    hideDotFiles = dotGitOnly
[svn-remote "svn"]
    url = http://localhost:81/svn/project/branches
    branches = 
[svn]
    authorsfile = C:/Users/ArpitAggarwal/authors.txt

与标签类似的错误:

  

无法检索密钥的配置:svn-remote.svn.tags

"tags"中添加一个空的.git/config密钥,如下所示:

[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
        hideDotFiles = dotGitOnly
    [svn-remote "svn"]
        url = http://localhost:81/svn/project/branches
        branches = dev/*:refs/remotes/origin/*
        tags =  
    [svn]
        authorsfile = C:/Users/ArpitAggarwal/authors.txt