Git错误:检测到大文件,尽管不存在大文件

3
我正试图将一个仓库推到Github上,但由于“检测到大文件”,我无法完成。最大的文件只有38兆字节!理应不会有问题。
然而,错误提示显示datafiles/FILENAME.json文件大小为2016.04兆字节,并且还在该子目录中。但是我已经删除了这个文件!我也使用了git commit,所以这些更改应该已经提交。
我进入该子目录(已使用git init进行初始化)。然后我尝试使用sudo git push origin master
下面是执行$ sudo git push origin master后得到的错误信息:
Counting objects: 19, done.

Delta compression using up to 4 threads.

Compressing objects: 100% (18/18), done.

Writing objects: 100% (19/19), 1.69 GiB | 385.00 KiB/s, done.

Total 19 (delta 9), reused 0 (delta 0)

remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

remote: error: Trace: b2274b496089a760fae877fdaf3d8b23

remote: error: See http://git.io/iEPt8g for more information.

remote: error: File datafiles/FILENAME.json is 2016.04 MB; this exceeds GitHub's file size limit of 100.00 MB

什么是问题?

注意:我认为您不需要使用 sudo - Nayuki
1
文件可能仍然存在于您的Git历史记录中。您是否提交了它,然后尝试将其推送,然后创建了第二个提交以删除它?如果是这样,请参阅此GitHub教程 - Pokechu22
我认为BFG是最好的选择!未来的读者,请访问此处https://rtyley.github.io/bfg-repo-cleaner/。 - ShanZhengYang
1个回答

1

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