gpt4 book ai didi

git fetch --tags 显示错误 : cannot lock ref 'refs/remotes/origin/pr/

转载 作者:行者123 更新时间:2023-12-02 20:00:37 25 4
gpt4 key购买 nike

我正在尝试执行以下 git 命令 -

git fetch --tags --progress https://github.com/<org>/<repo-name>.git +refs/pull/*:refs/remotes/origin/pr/*

并且不断出现错误:

error: cannot lock ref 'refs/remotes/origin/pr/1/head': 'refs/remotes/origin/pr' exists; cannot create 'refs/remotes/origin/pr/1/head'
From https://github.com/<org>/<repo-name>
! [new ref] refs/pull/1/head -> origin/pr/1/head (unable to update local ref)
error: cannot lock ref 'refs/remotes/origin/pr/10/head': 'refs/remotes/origin/pr' exists; cannot create 'refs/remotes/origin/pr/10/head'
! [new ref] refs/pull/10/head -> origin/pr/10/head (unable to update local ref)
error: cannot lock ref 'refs/remotes/origin/pr/100/head': 'refs/remotes/origin/pr' exists; cannot create 'refs/remotes/origin/pr/100/head'
! [new ref] refs/pull/100/head -> origin/pr/100/head (unable to update local ref)

任何有关如何解决问题的提示将不胜感激。

最佳答案

看起来曾经有一个名为 pr 的分支,并且新分支位于具有该名称的文件夹中,因此存在冲突。

尝试git remote prune origin ,这应该删除旧分支的本地跟踪副本,然后再次执行您的命令。

关于git fetch --tags 显示错误 : cannot lock ref 'refs/remotes/origin/pr/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55968601/

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