由于不存在的大文件造成的git推送错误 [英] git push error due to non-existent large file

查看:176
本文介绍了由于不存在的大文件造成的git推送错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 计数对象:78,完成。 
使用多达4个线程的增量压缩。
压缩对象:100%(67/67),完成。
写作对象:100%(71/71),36.29 MiB | 637.00 KiB / s,完成。
总计71(增量39),重用0(增量0)
远程:错误:GH001:检测到大文件。
remote:错误:跟踪:7e446266168df8617c74b6a319ec4538
remote:错误:有关更多信息,请参阅http://git.io/iEPt8g。
remote:error:文件lecture_2_github_io_numpy_pandas / data / cup98LRN.txt是111.74 MB;这超过了GitHub的文件大小限制为100 MB
到git@github.com:mas-dse / gbrock.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能将一些文件推送到'git@github.com:mas-dse / gbrock.git'

事情是,该txt文件不再存在。我对ipython笔记本进行了更改以删除该文本文件。保存笔记本。添加了对git的更改。承诺改变。然后尝试推动git,但它不想工作。



我无法使用:

  git rm  - 缓存'文件'

因为该文件不再存在。我不知道做什么。任何帮助将不胜感激。

解决方案

GitHub向我提供了这个循序渐进的文档,它对我有用:< https://help.github.com/articles/remove-sensitive-data/

基本上,需要对过去的提交做更彻底的清理。


I keep getting the same result when trying to push to git:

Counting objects: 78, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (67/67), done.
Writing objects: 100% (71/71), 36.29 MiB | 637.00 KiB/s, done.
Total 71 (delta 39), reused 0 (delta 0)
remote: error: GH001: Large files detected.
remote: error: Trace: 7e446266168df8617c74b6a319ec4538
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File lecture_2_github_io_numpy_pandas/data/cup98LRN.txt is 111.74 MB; this exceeds GitHub's file size limit of 100 MB
To git@github.com:mas-dse/gbrock.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:mas-dse/gbrock.git'

The thing is, that txt file does not exist any more. I made changes to the ipython notebook to have that text file removed. Saved the notebook. Added the changes to git. Committed the changes. Then try to do a push to git, but it does not want to work.

I can't use the:

git rm --cached 'file' 

Because that file does not exist any more. I have no clue what do. Any help would be much appreciated.

解决方案

GitHub provided me with this step-by-step documentation and it worked for me: https://help.github.com/articles/remove-sensitive-data/

Basically, needed to do a more thorough cleaning of past commits.

这篇关于由于不存在的大文件造成的git推送错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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