

You’ll need to pay for bandwidth too, since updating large files makes a copy of the file and must send the whole thing. However, it’s pretty easy to purchase more data from Settings > Billing, and 50 GB is only an extra $4.20 a month: This applies to normal repos as well as LFS repos. Github has support for Git LFS, but only allows 10 GB per repository. It’s just an extension of Git, so you don’t need to install any extra software or set up servers to handle data storage. To use it, you’ll need a server configured to use Git LFS. But, with LFS allowing you to have a massive repository with optimal clone times, this doesn’t affect the developer experience.

The main downside is that you now cannot use packfiles, which means you’re going to need extra storage for each and every copy of a file. LFS makes it much faster to get the repository up and running because Git only cares about the pointer, which is small, and only fetches the data it needs. This means that you’ll no longer need to download every versioned object just to clone the repo. When your Git client wants to clone a repository, or checkout the file, it downloads it from Git LFS instead. Basically, rather than storing the actual file in the repository, Git LFS simply stores a pointer to where that file actually is. So, a solution called Git Large File Storage (LFS) was made. Git manages this a bit internally with “packfiles,” which can do some garbage collection, but the problem of working with large files still remains. This is fine for small amounts of data, but it means that every time a file is modified, a snapshot must be made, and so if the file is very large, it can quickly take up a lot of room. Despite showing the user lists of changes, called diffs, Git actually uses a snapshot-based approach to storing data internally, and uses that to reconstruct the diffs, rather than the other way around. This soft limit comes down to the way Git stores data internally.

Github defines this maximum at 100 MB per repository. Git doesn’t technically have a maximum file size, but it starts to break down once you starting hitting a certain size of files. But, it’s often useful to track large files, and to make that easier, Git provides the Large File Storage (LFS) extension. Git, as well as services like Github, are built and optimized for lightweight text-based code files, and it’s rare to see repositories larger than a few GB.
