此问题已在此处有答案:
How to remove/delete a large file from commit history in the Git repository?(23个回答)
13天前关闭
我对堆栈溢出的研究再多也没有找到解决方案。
PS C:\Users\benia_6dpynbz\StartupApp> 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'
如果你能帮忙的话,我将不胜感激。
My.gitignore设置为通过包含/build/来排除构建目录中的所有文件。我尝试了flutter clean和我能想到的每一种方法来试图摆脱构建文件,但下面的终端消息仍然出现。它只是不允许任何类型的推送到远程存储库。
2条答案
按热度按时间ioekq8ef1#
因为你的提交有.apk文件,这个太大了。你不需要将这个文件添加到git。要解决这个问题,您可以将这些添加到您的.gitignore
i86rm4rw2#
用这个gitignore
这将删除运行时生成的所有生成配置和文件。答案源-https://stackoverflow.com/a/70369953/22228906