Github file size limit changed 6/18/13. Can't push now

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.


Solution 1:

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.

Solution 2:

Hi you could solve easily in this way:

git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch FILENAME.TAR' --prune-empty --tag-name-filter cat -- --all

link: https://help.github.com/articles/remove-sensitive-data

Solution 3:

According to GitHub's new file size limit (also: working with large files), instituted only hours ago, GitHub now has new policies of a 1GB filesize repository, warnings for pushes of files over 50 MB and complete rejection for fileuploads of 100MB.

GitHub warns you when you push a file larger than 50 MB. We'll reject pushes containing files larger than 100 MB. We do this for a few reasons.

You have a few options, but not many:

  • Upload your 100 MB+ files to a different service and share with that instead
  • Reduce the filesize of problematic files
  • Find a new repository

Solution 4:

The actual limit for each file on GitHub is 100 MiB, not 100 MB.

Demo: https://github.com/Franck-Dernoncourt/github-max-file-size


https://help.github.com/articles/what-is-my-disk-quota/ (mirror) erroneously claims that they place a strict limit of files exceeding 100 MB in size

The confusion between MB and MiB can be seen when pushing: in the example below, the error message from GitHub server indicates the file is 101 MB whereas git correctly indicates it is 101 MiB:

~\Documents\GitHub\test123 [master ↑1 +3 ~0 -0 !]> git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 101.03 MiB | 896.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File S
torage - https://git-lfs.github.com.
remote: error: Trace: e9206a9cd05c4ff5de79bba9d4caf9df
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File 101MB is 101.00 MB; this exceeds GitHub's file size limit of
 100.00 MB
To https://github.com/Franck-Dernoncourt/test123.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/Franck-Dernoncourt/test12
3.git'
~\Documents\GitHub\test123 [master ↑1 +3 ~0 -0 !]>