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

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

问题描述

我有一些csv文件大于100.00 MB的github文件大小限制。我一直在尝试使用Git Large File Storage扩展。



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



从LFS - 大文件版本控制 - 版本大文件(即使是大小与GB一样大的用Git)。



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

  git lfs track* .csv

但是,当我按下时:

  remote:error:File Time-Delay-ftn /Raw-count-data-minor-roads1.csv是445.93 MB;这超出了GitHub的文件大小限制为100.00 MB 
remote:error:File Time-Delay-ftn / Raw-count-data-major-roads.csv是295.42 MB;这超过了GitHub的文件大小限制为100.00 MB

当我查看有问题的文件夹时:

  -rw-r ----- 1位用户员工42B 10月23日12:34 .gitattributes 
-rw-r- -r-- 1位用户人员1.3K 10月19日14:32 DfT_raw_major_manipulation.py
-rw-r - r-- 1位用户人员1.2K 16 Oct 15:08 DfT_raw_minor_manipulation.py
drwxr-xr -x 21用户人员714B 22 Oct 11:35驾驶/
-rwxr-xr-x @ 1用户人员295M 10月19日14:47 Raw-count-data-major-roads1.csv *
- rwxr-xr-x @ 1用户工作人员446M 10月16日14:52 Raw-count-data-minor-roads1.csv *

在vim .gitattributes文件中,您可以看到lfs设置:

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

我做错了什么?



更新



当我查询时

  git lfs ls-files 

我什么也没得到。这表明尽管.csv过滤器已成功应用于.gitattributes文件,但csv文件不会被lfs拾取

解决方案

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



您需要重写历史记录以将git-lfs引入您的现有提交。我推荐BFG回购清洁工具,其中添加了LFS支持

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

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


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/

From LFS - "Large file versioning- Version large files—even those as large as a couple GB in size—with Git."

I have applied the following on the folders of concern:

git lfs track "*.csv"

However, when I push:

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*

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

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

What am I doing wrong?

UPDATE

When I query

git lfs ls-files

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

解决方案

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.

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.

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天全站免登陆