如果未--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
仍然如果您不想指定--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