我正在关注SVN到Git migration guide,git 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
答案 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