本文介绍了达到GitHub Git-LFS限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即使LFS(Github的大文件存储)现在跟踪了我剩下的单个大文件(138 mb),我仍然以某种方式达到了github数据限制.我重置为经过的最后一次提交,确保LFS跟踪了唯一的(据我所知)问题文件.我仍然收到以下错误,并且不知道该怎么办.

I have somehow reached the github data limit even though my single remaining large file (138 mb) is now being tracked by LFS (Github's Large File Storage). I reset to the last commit that went through, made sure that LFS was tracking the only (to my knowledge) problem file. I still get the following error, and have no idea what to do.

batch response: This repository is over its data quota. Purchase more data packs to restore access.
Uploading LFS objects:   0% (0/1), 0 B | 0 B/s, done
error: failed to push some refs to <repo name>

我已经使用LFS成功存储了多个大文件.我不知道是什么引起了这个问题.

I have used LFS to store multiple large files before with success. I don't know what could be causing this issue.

推荐答案

说实话,我发现了存储条款&远程服务器上的条件真的很奇怪.GitHub" tracks "拥有GitHub Free帐户的个人在其基础架构上的大型文件的限制为1 GB.

To be honest I find the storage terms & conditions on the remote server really weird. GitHub "tracks" your Large File on their infrastructure with a limit of 1 GB for individuals holding a GitHub Free account.

但是有一个警告:说您使用Git LFS初始化了本地存储库,将138 MB的文件推送到LFS服务器,一切正常.花花公子.现在,如果由于某种原因或其他原因,您决定更改文件的某些方面,即使仅是1 Byte的大更改,Git LFS就会将其作为一个全新文件进行跟踪.因此,随着时间的推移,当您不断更改大文件时,它将占用服务器上宝贵的存储空间.

But there's a caveat; say you initialized your local repository with Git LFS, pushed the 138 MB file to the LFS server, all good & dandy. Now if for some reason or the other you decide to change some aspects of the file, even if it's a mere 1 Byte big change, Git LFS tracks it as a totally new file. Hence over time as you keep changing the Large File, it takes up precious storage space on the servers.

奇怪的是,甚至官方文档都没有提到删除大文件的先前版本以释放宝贵空间的任何方法.

Weirdly enough, not even the official documentation mentions any way to remove previous versions of the Large File to free up precious space.

下面是一个示例,详细说明了我刚才提到的内容:

Here's an example detailing exactly what I mentioned:

您可以在此处的官方文档中了解更多信息-跟踪存储和带宽使用情况

You can read more in the official documentation here - Tracking storage and bandwidth use

这篇关于达到GitHub Git-LFS限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-18 23:45