【发布时间】:2020-08-01 06:44:27
【问题描述】:
我遇到的问题是因为我使用了超过 100mb 的文件,这超出了 GitHub 的 100.00 MB 文件大小限制。我试图通过使用 Git 大文件存储来解决这个问题。我完成了这个过程,并且能够通过 Git LFS 跟踪文件:
$ git lfs track
Listing tracked patterns
*.mov (.gitattributes)
*.mov (.gitattributes)
*.pdf (.gitattributes)
$ git lfs ls-files
cca18d4057 * build/static/media/BOL.6bcd7050.pdf
2af10f49e8 * build/static/media/DAOCCA.61340b94.pdf
6a0532b0cc * build/static/media/ebtms.4f75ae1c.pdf
f7ae820210 * build/static/media/tmsvideo.4967bd7f.mov
9e7d2e2bf5 * src/images/new/IMG_2156.MOV
1be822f20d * src/images/new/IMG_2248.MOV
f8fe209393 * src/images/new/IMG_2993.MOV
f7ae820210 * src/images/tmsvideo.mov
cca18d4057 * src/pdf/BOL.pdf
2af10f49e8 * src/pdf/DAOCCA.pdf
6a0532b0cc * src/pdf/ebtms.pdf
但是当我 yarn run deploy 时,我仍然收到和以前一样的错误:
$ yarn run deploy
remote: warning: File static/media/DAOCCA.61340b94.pdf is 85.94 MB; this is larger than
GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage -
https://git-lfs.github.com.
remote: error: Trace: d11b54c3460af3d02eb47c2fc15d64e1
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File static/media/tmsvideo.4967bd7f.mov is 110.54 MB; this exceeds GitHub's
file size limit of 100.00 MB
我将 React 应用程序部署到 GitHub Pages 没有问题;但是,当我尝试将它结合起来并利用 Git 大文件存储时,我没有成功。
非常感谢任何建议。
【问题讨论】:
标签: reactjs git github-pages yarnpkg git-lfs