Git lfs - “这超出了 GitHub 的 100.00 MB 文件大小限制"; [英] Git lfs - "this exceeds GitHub's file size limit of 100.00 MB"

查看:62
本文介绍了Git lfs - “这超出了 GitHub 的 100.00 MB 文件大小限制";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些 csv 文件大于 github 的文件大小限制 100.00 MB.我一直在尝试使用 Git 大文件存储扩展.

I have some csv files that are larger than github's file size limit of 100.00 MB. I have been trying to use the Git Large File Storage extension.

https://git-lfs.github.com/

来自 LFS - 大文件版本控制 - 使用 Git 对大文件进行版本控制 - 甚至大到几 GB 的文件."

我已对相关文件夹应用以下内容:

I have applied the following on the folders of concern:

git lfs track "*.csv"

但是,当我推送时:

remote: error: File Time-Delay-ftn/Raw-count-data-minor-roads1.csv is 445.93 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Time-Delay-ftn/Raw-count-data-major-roads.csv is 295.42 MB; this exceeds GitHub's file size limit of 100.00 MB

当我查看相关文件夹时:

When I look at the folder in question:

-rw-r-----   1 user  staff    42B 23 Oct 12:34 .gitattributes
-rw-r--r--   1 user  staff   1.3K 19 Oct 14:32 DfT_raw_major_manipulation.py
-rw-r--r--   1 user  staff   1.2K 16 Oct 15:08 DfT_raw_minor_manipulation.py
drwxr-xr-x  21 user  staff   714B 22 Oct 11:35 Driving/
-rwxr-xr-x@  1 user  staff   295M 19 Oct 14:47 Raw-count-data-major-roads1.csv*
-rwxr-xr-x@  1 user  staff   446M 16 Oct 14:52 Raw-count-data-minor-roads1.csv*

当我 vim .gitattributes 文件时,您可以看到 lfs 设置:

when I vim the .gitattributes file you can see the lfs setup:

*.csv filter=lfs diff=lfs merge=lfs -text

我做错了什么?

更新

当我查询时

git lfs ls-files

我没有得到任何回报.这表明尽管 .csv 过滤器已成功应用于 .gitattributes 文件,但 lfs 并未提取 csv 文件

I get nothing returned. This indicates that despite the .csv filter being successfully applied to the .gitattributes file the csv files are not being picked up by lfs

推荐答案

简单地将 git-lfs 配置添加到现有存储库不会追溯将您的大文件转换为 LFS 支持.这些大文件将保留在您的历史记录中,GitHub 将拒绝您的推送.

Simply adding git-lfs configuration to an existing repository will not retroactively convert your large files to LFS support. Those large files will remain in your history and GitHub will refuse your pushes.

您需要重写您的历史记录以将 git-lfs 引入您现有的提交.我推荐 BFG repo 清洁工具,它添加了 LFS 支持 最近.

You need to rewrite your history to introduce git-lfs to your existing commits. I recommend the BFG repo cleaner tool, which added LFS support recently.

您应该能够通过以下方式转换 CSV 文件的历史使用情况:

You should be able to convert historical usage of your CSV files by:

$ java -jar ~/bfg-1.12.5.jar --convert-to-git-lfs '*.csv' --no-blob-protection

这篇关于Git lfs - “这超出了 GitHub 的 100.00 MB 文件大小限制";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆