首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BFG-repo-cleaner和推送回GitHub

BFG-repo-cleaner和推送回GitHub
EN

Stack Overflow用户
提问于 2020-05-20 05:07:30
回答 1查看 316关注 0票数 1

我正在尝试遵循这里的教程说明:https://rtyley.github.io/bfg-repo-cleaner/

我使用--mirror克隆了一个基于github的存储库的新副本

我遵循运行bgf和reflog的说明。

我的本地存储库现在已经删除了这个大博客。太棒了。

当我推送回github时,我得到

代码语言:javascript
复制
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

相同的错误信息。

我遗漏了什么?

EN

回答 1

Stack Overflow用户

发布于 2020-05-20 05:19:51

好的。

我解决了这个问题。这是我自己愚蠢的错误,但留下这个问题,以防其他人做同样的事情。

虽然我第一次从github克隆存储库时使用了--mirror,但在某些情况下,我再次尝试,但忘记了使用--mirror选项。

当我重新开始使用该选项时,它按照教程的建议工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61900790

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档