文件ios/Flutter/Flutter.framework/Flutter为351.71 MB;这超过了GitHub的100.00 MB文件大小限制。

3
我想把我最新的提交推到GitHub上。但是它显示以下错误:
remote: Resolving deltas: 100% (43/43), completed with 41 local objects.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c8bf146b362d19d128f2ffe74b5b5b9d
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File ios/Flutter/Flutter.framework/Flutter is 351.71 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/ChandraPrakashJangid/geo_tags.git
 ! [remote rejected] master -> master (pre-receive hook declined)

2个回答

4

看起来你是把生成的文件和构建文件夹上传到了Github。请编辑你的.gitignore文件,只上传必要的文件和Lib文件。

一个Flutter 的.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
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/app/release/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

0
在您的根目录下创建一个.gitignore文件,并添加以下配置:
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/

之后保存并再次推送到Github


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接