Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Git-LFS limit reached

Tags:

github

git-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>

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

like image 266
Robby Costales Avatar asked Jun 26 '18 21:06

Robby Costales


People also ask

Does GIT LFS have a limit?

If you exceed the limit of 5GB, any new files added to the repository will be rejected silently by Git LFS. You can also use Git LFS with GitHub Desktop.

How do I check my git LFS limit?

In the "Access" section of the sidebar, click Billing and plans. View details of your bandwidth and storage usage under "Git LFS Data." To view your organization's LFS data usage by repository, click the arrows next to "Storage" and "Bandwidth."


1 Answers

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.

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:

If you push a 500 MB file to Git LFS, you'll use 500 MB of your allotted storage and none of your bandwidth. If you make a 1 byte change and push the file again, you'll use another 500 MB of storage and no bandwidth, bringing your total usage for these two pushes to 1 GB of storage and zero bandwidth.

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

like image 104
Jarmos Avatar answered Oct 07 '22 18:10

Jarmos