GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com

Viewed 60

I'm getting this error when trying to push my project to github. No errors on flutter doctor. code is also building smoothly. I read some similar issues that the .gradle file should be added to .gitignore so i added it but still i'm getting the error.

Please someone help me check what i'm missing here.

remote: warning: File client/android/.gradle/7.4/executionHistory/executionHistory.bin is 52.82 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/android/.gradle/7.4/executionHistory/executionHistory.bin is 51.74 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/build/app/intermediates/assets/debug/mergeDebugAssets/flutter_assets/kernel_blob.bin is 61.41 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/build/app/intermediates/assets/debug/mergeDebugAssets/flutter_assets/kernel_blob.bin is 56.76 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/android/.gradle/7.4/executionHistory/executionHistory.bin is 83.26 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/android/.gradle/7.4/executionHistory/executionHistory.bin is 60.11 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/build/app/intermediates/assets/debug/mergeDebugAssets/flutter_assets/kernel_blob.bin is 57.14 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: warning: File client/build/app/intermediates/assets/debug/mergeDebugAssets/flutter_assets/kernel_blob.bin is 63.07 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB remote: error: Trace: 4f48edbe41970ca7dea79f0b7071d3f239328af659a42c9b55b328f57d734721 remote: error: See http://git.io/iEPt8g for more information. remote: error: File client/build/app/outputs/apk/debug/app-debug.apk is 137.85 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File client/build/app/outputs/apk/debug/app-debug.apk is 157.14 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File client/build/app/outputs/apk/debug/app-debug.apk is 153.09 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File client/build/app/outputs/apk/debug/app-debug.apk is 152.97 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: File client/build/app/outputs/flutter-apk/app.apk is 136.92 MB; this exceeds GitHub's file size limit of 100.00 MB remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

My project was originally wrapped in folder named client. When i removed the client folder and push my project to github, this error now appeared. I flutter cleaned many times but to no avail.

This is my gitignore in the trunk

trunk's gitignore

this is also my git ignore inside android folder

gitignore inside android folder

1 Answers

Based on the links in the error message, the files are too large for GitHub to handle. They have a filesize limit of 100 MB and will reject commits containing files larger than that (https://docs.github.com/en/repositories/working-with-files/managing-large-files/about-large-files-on-github).

Try changing to **/android/ instead of /android/, .gradle/ instead of /.gradle/, and build/ instead of /build/ in your .gitignore file. The large files are in both those directories. (Taken from https://gist.github.com/dileepabandara/43f37affb84650a7e59ff04204c44aa8).

If Github still won't let you push and doesn't recognize that you moved the files to a new directory, try the accepted answer here: Github doesn't detect new folder.

If your directory structure looks like this:

/------WebsiteName/
        |
        |-----------/Mobile/ 

Then make sure you are in WebsiteName directory, then run git status

If you are still getting the same error then run the following in order:

git status //here you should see the mobile folder and its files 
git add --all 
git commit -am "committing" 
git push --all
Related