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

JOh*_*y.C 1 git git-lfs

所以我在我的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
Run Code Online (Sandbox Code Playgroud)

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

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
Run Code Online (Sandbox Code Playgroud)

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

JOh*_*y.C 5

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

git reset --soft HEAD~1
Run Code Online (Sandbox Code Playgroud)