我在git方面不是很有经验,但几个月前我设置了一个私有存储库的公共镜像,现在我希望将它更新到私有存储库的当前状态。
我遵循这里的说明,并且非常肯定这是我最初创建镜像时遵循的:
但是,这一次当我执行以下操作时:
git clone --mirror https://github.com/billtubbs/process-observers.git
cd process-observers.git/
git push --mirror https://github.com/billtubbs/ml-obs.git
我得到了
Enumerating objects: 991, done.
Counting objects: 100% (991/991), done.
Delta compression using up to 8 threads
Compressing objects: 100% (261/261), done.
Writing objects: 100% (938/938), 2.27 MiB | 2.67 MiB/s, done.
Total 938 (delta 724), reused 889 (delta 677)
remote: Resolving deltas: 100% (724/724), completed with 40 local objects.
To https://github.com/billtubbs/ml-obs.git
+ 74c80ea...9ff3e6b main -> main (forced update)
dce6fcc..9ff3e6b origin/main -> origin/main
* [new branch] origin/HEAD -> origin/HEAD
! [remote rejected] refs/pull/1/head -> refs/pull/1/head (deny updating a hidden ref)
! [remote rejected] refs/pull/2/head -> refs/pull/2/head (deny updating a hidden ref)
error: failed to push some refs to 'https://github.com/billtubbs/ml-obs.git'
这是什么意思“没能把一些裁判推到.”?
所有文件似乎都被更新了。
发布于 2022-10-25 22:21:23
我想你在看医生的时候可能犯了个小错误。
尝试在--mirror
命令中将选项git clone
更改为--bare
。
就像在文档中写的一样:
$ git clone --bare https://github.com/EXAMPLE-USER/OLD-REPOSITORY.git
https://stackoverflow.com/questions/74200529
复制相似问题