错误
上传github文件带了测试数据,结果测试数据太大,上传不了:
代码语言:javascript复制Enumerating objects: 66, done.
Counting objects: 100% (66/66), done.
Delta compression using up to 8 threads
Compressing objects: 100% (52/52), done.
Writing objects: 100% (55/55), 170.58 MiB | 1.55 MiB/s, done.
Total 55 (delta 26), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (26/26), completed with 5 local objects.
remote: error: Trace: 405ebb8940b239aec85cd8d2b57faa2b154ec135647a1ae27c891ec512d61129
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File data/1212888 is 412.17 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 github.com:forfreeday/java.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'github.com:forfreeday/java.git'
解决
调整上传大小限制
代码语言:javascript复制git config --global http.postBuffer 524288000
查看是否生效
代码语言:javascript复制git config -l
http.postbuffer
已经调整到: 52428000=500×1024×1024,等于 500M。
http.postbuffer=524288000 core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true