Search code examples
gitgithubmigrationgerrit

Facing " this exceeds GitHub's file size limit of 100.00 MB" error while moving code from Gerrit to Github


I am moving all my projects from Gerrit to Git hub by following the instructions provided here.

While Pushing, I am getting below error

git push <git url> --all
Counting objects: 383567, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (125080/125080), done.
Writing objects: 100% (383567/383567), 647.42 MiB | 7.05 MiB/s, done.
Total 383567 (delta 249729), reused 383559 (delta 249723)
remote: Resolving deltas: 100% (249729/249729), done.
remote: Checking connectivity: 383567, done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 213456sdfggdas123refsdaw
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File aclocal.m4 is 147.07 MB; this exceeds GitHub's file size limit of 100.00 MB

No file in the entire repository is more than 1 MB and that particular file is about 45KB. There are about 40 branches in that project and changes are happening very frequently.

How do I overcome this problem? Will it work if I just install Git Large File Storage and try pushing?

Removing the history is not an option for me


Solution

  • The error message tells you the file in your history that is too big (aclocal.m4 is 147.07 MB).

    If you absolutely want to push your history on GitHub, you only have 2 options (that will modify your history):

    • You could rewrite it to remove the file if it is not needed and was committed by error.
    • Or you could indeed convert all your repository (and your history) to "Git Large File Storage" using git lfs migrate. Not just install it...