skip to Main Content

No amount of stack overflow research has lead me to a solution.

PS C:Usersbenia_6dpynbzStartupApp> git push origin BensVersion
Enumerating objects: 933, done.
Counting objects: 100% (878/878), done.
Delta compression using up to 12 threads
Compressing objects: 100% (362/362), done.
Writing objects: 100% (515/515), 97.78 MiB | 1.17 MiB/s, done.
Total 515 (delta 197), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (197/197), completed with 24 local objects.
remote: warning: File build/app/intermediates/assets/debug/flutter_assets/kernel_blob.bin is 56.58 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: Trace: 4583cbfce6b24514a767f7cb761905a033855f92fceda479732f91b36bf91249
remote: error: See https://gh.io/lfs for more information.
remote: error: File build/app/outputs/apk/debug/app-debug.apk is 101.46 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.
To https://github.com/mattwalter2/StartupApp
 ! [remote rejected] BensVersion -> BensVersion (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/mattwalter2/StartupApp'

Any help would be appreciated.

My .gitignore is setup to exclude all the files in the build directory by including /build/. I tried flutter clean and every method I could think of to try to get rid of the build files but the terminal messages below continue to appear regardless. It simply won’t allow any kind of push to the remote repository.

2

Answers


  1. Cause your commit have .apk file, this to large.
    You don’t need add this file to git.
    To resolve you can add these to your .gitignore

    #built application files
    *.apk
    *.ap_
    *.aab
    
    Login or Signup to reply.
  2. Use this .gitignore

    # Miscellaneous
    *.class
    *.log
    *.pyc
    *.swp
    .DS_Store
    .atom/
    .buildlog/
    .history
    .svn/
    
    # IntelliJ related
    *.iml
    *.ipr
    *.iws
    .idea/
    
    # The .vscode folder contains launch configuration and tasks you configure in
    # VS Code which you may wish to be included in version control, so this line
    # is commented out by default.
    #.vscode/
    
    # Flutter/Dart/Pub related
    **/ios/Flutter/.last_build_id
    .dart_tool/
    .vscode/
    .flutter-plugins
    .flutter-plugins-dependencies
    .packages
    .pub-cache/
    .pub/
    /build/
    
    # Web related
    lib/generated_plugin_registrant.dart
    
    # Symbolication related
    app.*.symbols
    
    # Obfuscation related
    app.*.map.json
    
    # Android Studio will place build artifacts here
    /android/app/debug
    /android/app/profile
    /android/app/release
    .vscode/launch.json
    ios/Flutter/Release.xcconfig
    ios/Flutter/Debug.xcconfig
    macos/Flutter/Flutter-Debug.xcconfig
    macos/Flutter/Flutter-Release.xcconfig
    

    This will remove all the build config and files that are generated when you run.
    Answer Source- https://stackoverflow.com/a/70369953/22228906

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search