gpt4 book ai didi

git - 导入 Git 存储库时出错

转载 作者:行者123 更新时间:2023-12-05 05:22:10 25 4
gpt4 key购买 nike

我正在尝试使用命令行导入 Git 存储库。我正在使用这个 guide

但是我一直在第 3 步遇到这个错误:

% git push --mirror https://github.com/kbavishi/prads.git
[...]
remote: error: GH002: Sorry, branch or tag names consisting of 40 hex characters are not allowed.
remote: error: Invalid branch or tag name "19f72fa66ffc0ba33f00ba5e5897e109f822e939"
To https://github.com/kbavishi/prads.git
! [remote rejected] 19f72fa66ffc0ba33f00ba5e5897e109f822e939 -> 19f72fa66ffc0ba33f00ba5e5897e109f822e939 (pre-receive hook declined)
[...]

知道如何解决这个问题吗?提前致歉,我是 Git 的新手。

我在 Github 支持上发布了一个请求,我收到了一个回复,要求我使用 git-filter-branch 命令修改标签,然后再次尝试导入存储库。我不太明白如何使用它

最佳答案

如果在输入 git tag 时,你看到一个名为“19f72fa66ffc0ba33f00ba5e5897e109f822e939”的标签,你应该能够 to rename it easily enough .

git tag NEW OLD 
tag -d OLD

如果是分支名称(输入git branch),你应该可以rename it as well .

git branch -m <oldname> <newname>

完成此操作后,您可以将推送镜像回您的 GitHub 存储库。

关于git - 导入 Git 存储库时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41254479/

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