我正在尝试遵循这里的教程说明:https://rtyley.github.io/bfg-repo-cleaner/
我使用--mirror克隆了一个基于github的存储库的新副本
我遵循运行bgf和reflog的说明。
我的本地存储库现在已经删除了这个大博客。太棒了。
当我推送回github时,我得到
To github.com:interstar/myproject.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:interstar/myproject.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.因此,我尝试从github获取git pull以确保同步。(即使这个存储库是在该过程开始时从github干净克隆的)
它会把我想要去掉的斑点都拉下来。因此,我的回购已恢复到以前的大小。
所以我再次运行bfg和reflog。不错的小回购。
尝试推送回github
相同的错误信息。
我遗漏了什么?
发布于 2020-05-20 05:19:51
好的。
我解决了这个问题。这是我自己愚蠢的错误,但留下这个问题,以防其他人做同样的事情。
虽然我第一次从github克隆存储库时使用了--mirror,但在某些情况下,我再次尝试,但忘记了使用--mirror选项。
当我重新开始使用该选项时,它按照教程的建议工作。
https://stackoverflow.com/questions/61900790
复制相似问题