Github 文件大小限制已于 2013 年 6 月 18 日更改.现在不能推 [英] Github file size limit changed 6/18/13. Can't push now

查看:16
本文介绍了Github 文件大小限制已于 2013 年 6 月 18 日更改.现在不能推的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自 2013 年 6 月 18 日起,此更改对我的现有存储库的文件超出该限制有何影响?我上次推送了一个大文件是在 2 个月前.

我有一个已在本地删除的大文件,但现在无法推送任何内容.我收到远程错误"...远程:错误:文件 cron_log.log 为 126.91 MB;这超出了 GitHub 的 100 MB 文件大小限制

我在原始推送后将文件添加到 .gitignore ......但它仍然存在于远程(源)上

在本地删除它应该在源(Github)上删除它,对吗?......但是......它不让我推,因为Github上有一个超过限制的文件......

https://github.com/blog/1533-new-file-size-limits

这些是我发出的命令和错误信息..

<前>git 添加.git commit -m "删除 cron_log.log"git push origin master远程:错误代码:40bef1f6653fd2410fb2ab40242bc879远程:警告:错误 GH413:检测到大文件.远程:警告:有关更多信息,请参阅 http://git.io/iEPt8g.远程:错误:文件 cron_log.log 为 141.41 MB;这超出了 GitHub 的 100 MB 文件大小限制远程:错误:文件 cron_log.log 是 126.91 MB;这超出了 GitHub 的 100 MB 文件大小限制到 https://github.com/slinds(omited_here)/linexxxx(omited_here).git![远程拒绝] master -> master(预接收钩拒绝)错误:未能将一些引用推送到https://github.com/slinds(omited_here)"

然后我尝试了诸如

之类的东西

git rm cron_log.loggit rm --cached cron_log.log

同样的错误.

解决方案

正如 rlb.usa 所指出的,Github 已添加文件大小限制,可防止您推送大于 100MB 的文件.您尝试在新提交中删除该文件并尝试推送该文件.那失败了,因为您不仅要推动最后一次提交,还要推动其他三个提交.这三个提交包含大小为 141MB 和 126MB 的 cron_log 版本.它们会导致您的推送失败.

要解决这个问题,您有两个选择:

  • 运行git rebase -i origin/master,使用git commit --amend设置每次提交以编辑和删除每个提交中的文件.
  • 使用 BFG Repo-Cleaner 清理您的所有历史记录.

How does this change as of June 18, 2013 affect my existing repository with a file that exceeds that limit? I last pushed 2 months ago with a large file.

I have a large file that I have removed locally but I can not push anything now. I get a "remote error" ... remote: error: File cron_log.log is 126.91 MB; this exceeds GitHub's file size limit of 100 MB

I added the file to .gitignore after original push... But it still exists on remote (origin)

Removing it locally should get rid of it at origin(Github) right? ... but ... it is not letting me push because there is a file on Github that exceeds the limit...

https://github.com/blog/1533-new-file-size-limits

These are the commands I issued plus error messages..

git add .
git commit -m "delete cron_log.log"
git push origin master

remote: Error code: 40bef1f6653fd2410fb2ab40242bc879
remote: warning: Error GH413: Large files detected.
remote: warning: See http://git.io/iEPt8g for more information.
remote: error: File cron_log.log is 141.41 MB; this exceeds GitHub's file size limit of 100 MB
remote: error: File cron_log.log is 126.91 MB; this exceeds GitHub's file size limit of 100 MB

To https://github.com/slinds(omited_here)/linexxxx(omited_here).git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/slinds(omited_here)

I then tried things like

git rm cron_log.log
git rm --cached cron_log.log

Same error.

解决方案

As rlb.usa noted, Github has added a file size limit that prevents you from pushing files > 100MB. You tried to remove the file in a new commit and tried to push that. That fails, because you are not just pushing that last commit, but also three others. Those three commits contain versions of cron_log that are 141MB and 126MB in size. They cause your push to fail.

To fix that, you have two options:

  • Run git rebase -i origin/master, set every commit to edit and remove the file in each with git commit --amend.
  • Use the BFG Repo-Cleaner to clean all your history.

这篇关于Github 文件大小限制已于 2013 年 6 月 18 日更改.现在不能推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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