SVN-Git迁移:clean-git分支错误
SVN-Git migration: clean-git branch error
我正在跟随 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
当您未指定 --branches
而 运行 是 git svn clone
命令时,就会出现此问题。您可以通过在执行 git svn clone
时指定 --branches
来避免它,如下所示:
git svn clone --username=ArpitAggarwal --branches=/dev --authors-file=C:/Users/ArpitAggarwal/authors.txt http://localhost:81/svn/project/branches/ dev-git
如果你不想指定 --branches
,解决方法是在 .git/config
中添加一个空的 "branches"
键,如下所示:
[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
对于标签的类似错误:
Could not retrieve the config for the key: svn-remote.svn.tags
在.git/config
中添加一个空的"tags"
键,如下:
[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
我正在跟随 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
当您未指定 --branches
而 运行 是 git svn clone
命令时,就会出现此问题。您可以通过在执行 git svn clone
时指定 --branches
来避免它,如下所示:
git svn clone --username=ArpitAggarwal --branches=/dev --authors-file=C:/Users/ArpitAggarwal/authors.txt http://localhost:81/svn/project/branches/ dev-git
如果你不想指定 --branches
,解决方法是在 .git/config
中添加一个空的 "branches"
键,如下所示:
[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
对于标签的类似错误:
Could not retrieve the config for the key: svn-remote.svn.tags
在.git/config
中添加一个空的"tags"
键,如下:
[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