bla*_*ird 5 svn git version-control git-svn
我正在关注SVN到Git的迁移指南,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
Run Code Online (Sandbox Code Playgroud)
如果未--branches
在运行git svn clone
命令时指定,则会出现此问题.你可以通过指定--branches
while执行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
Run Code Online (Sandbox Code Playgroud)
仍然如果您不想指定--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
Run Code Online (Sandbox Code Playgroud)
对于标签的类似错误:
无法检索密钥的配置: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
Run Code Online (Sandbox Code Playgroud)