gpt4 book ai didi

git-svn 克隆失败 "fatal: Not a valid object name"

转载 作者:行者123 更新时间:2023-12-04 00:11:32 24 4
gpt4 key购买 nike

同时做git svn clone -s https://svn.example.com/repo/我收到以下输出:

r3073 = a6132f3a937b632015e66d694250da9f606b8333 (refs/remotes/trunk)
Found possible branch point: https://svn.example.com/repo/trunk => https://svn.example.com/repo/branches/v1.3, 3073
W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: repo/branches/trunk
real path: repo/trunk
Continuing ahead with repo/trunk
W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: repo/branches/trunk
real path: repo/trunk
Continuing ahead with repo/trunk
W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: repo/branches/trunk
real path: repo/trunk
Continuing ahead with repo/trunk
W: Refspec glob conflict (ref: refs/remotes/trunk):
expected path: repo/branches/trunk
real path: repo/trunk
Continuing ahead with repo/trunk
fatal: Not a valid object name refs/remotes/tags/Sync Controllers
cat-file commit refs/remotes/tags/Sync Controllers: command returned error: 128

运行 git branch -a给出:
remotes/tags/Sync%20Controllers
remotes/tags/v1.1
remotes/trunk
remotes/v1.2

我认为问题在于“ Remote /标签/同步 Controller ”!=“ Remote /标签/Sync%20Controllers”。

最佳答案

SVN上的标签里面有一个空格,但是git中的标签把这个空格转换成了%20 (URL 编码)。要解决它,只需手动添加一个带有逐字名称的新标签:

cd .git/refs/remotes/tags/
mv Sync%20Controllers Sync\ Controllers

然后运行 ​​ git svn clone再次命令。

(通常你会用 git tag OLDTAG NEWTAG 来做这件事,但 git 不允许我定义一个带有空格的标签。标签文件只是包含相关提交哈希的文本文件。)

关于git-svn 克隆失败 "fatal: Not a valid object name",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11365317/

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