git lfs 不起作用 - 仍然抛出错误 - 远程:错误:GH001:检测到大文件

问题描述 投票:0回答:3

所以我在我的rails项目中使用了node,并且有一个文件github不会推送,因为它超过了100MB:

node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome

我做到了

git lfs install
git lfs track "/node_modules/*"
git add .gitattributes
git add .
git commit -am "commit after lfs"
git push

但它仍然抛出同样的错误:

remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: d06553d5a0051916cd0d22b28f55bb105cb07d442b1a6f6133e51e888e22b221
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File node_modules/puppeteer/.local-chromium/linux-856583/chrome-linux/chrome is 274.64 MB; this exceeds GitHub's file size limit of 100.00 MB

我还使用 git lfs ls-files 检查过,我看到了该文件 我在这里做错了什么?

git git-lfs
3个回答
6
投票

要解决这个问题,我必须首先撤消之前的提交:

git reset --soft HEAD~1

3
投票

您需要先执行

git lfs push
来推送所有LFS文件。


0
投票

我在%88之后遇到了同样的问题,它被卡住并且没有完成上传过程。

这就是我尝试过并解决的问题;

Git LFS 完整性检查确保所有引用的 Git LFS 文件 在推送中已正确上传。如果检查检测到引用 尚未上传的文件,您将收到错误消息 并且您的推送将被阻止。

要解决该错误消息,您必须重新安装本地 Git LFS 客户端确保引用的Git LFS文件能够正常 以后上传。

Open Terminal

重新安装 Git LFS

git lfs install

推送所有引用的 Git LFS 文件

git lfs push --all origin
© www.soinside.com 2019 - 2024. All rights reserved.