github中的幻影文件提交 [英] Phantom file in github commit

查看:107
本文介绍了github中的幻影文件提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图对github存储库进行一些更改,但由于git认为存储库中存在大文件,推送失败。

  remote:错误代码:38865a38ccad9b1d9f394c35344906e6 
远程:警告:错误GH413:检测到大文件。
remote:警告:有关更多信息,请参阅http://git.io/iEPt8g。
remote:错误:文件视频/ Lecture2.mp4是134.01 MB;这超过了GitHub的文件大小限制为100 MB

但是文件视频/ Lecture2.mp4不在库。也没有视频目录。



有关如何删除此文件以便推送其他更改的任何想法?

解决方案

如果该文件是在git repo的历史记录中的任何时间点提交的,但随后被删除,您将不会在当前状态下看到它,但它仍然会推送。

让BFG尝试从您的历史记录中删除该大文件。

BFG Repo-Cleaner :删除像git-filter-branch这样的大或麻烦的blob,但速度更快。

I am trying to push some changes to my github repository but the push is failing because of a large file that git thinks is in the repository.

remote: Error code: 38865a38ccad9b1d9f394c35344906e6
remote: warning: Error GH413: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: error: File videos/Lecture2.mp4 is 134.01 MB; this exceeds GitHub's file size limit of 100 MB

But the file videos/Lecture2.mp4 is not in the repository. There is no videos directory either.

Any ideas of how to remove this file so that I can push the other changes?

解决方案

If that file was committed at any point in the history of the git repo, but then deleted, you wouldn't see it in your current status, but it would still be pushed.

Give BFG a try to remove that large file from your history.

BFG Repo-Cleaner: "Removes large or troublesome blobs like git-filter-branch does, but faster."

这篇关于github中的幻影文件提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆