gpt4 book ai didi

git - SVN-Git 迁移 : clean-git branch error

转载 作者:太空狗 更新时间:2023-10-29 13:19:16 26 4
gpt4 key购买 nike

我正在关注 Git 的 SVN 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

最佳答案

当您在运行 git svn clone 命令时没有指定 --branches 时会出现此问题。您可以通过在执行 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

关于git - SVN-Git 迁移 : clean-git branch error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34620655/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com