What is Git LFS large file storage?

更新时间:
复制 MD 格式

This topic describes what Git Large File Storage (LFS) is and the problems it solves.

The problem with Git and large files

Git is a popular distributed versioning tool. Local and remote repositories store all files and their complete change history. This makes code collaboration simple and efficient. However, this same feature creates problems for versioning large files, such as images, videos, or other binary files. There are two main problems:

  • Slower performance: Every version of every file is downloaded to the local repository, regardless of whether the history of these large files is needed. This increases download times.

  • Larger repository size: As more large files and their associated commits are added, the Git repository grows very quickly. This consumes a large amount of disk space.

These two problems are a major issue for many Git users, such as game developers, design engineers, and document managers. These users often work with repositories that are affected by these issues. They want to continue using Git for its versioning and workflow capabilities. However, their work becomes less efficient as large files and their histories grow in the repository. Git LFS was created to solve these problems. It is the main solution for handling large files in Git.

What is Git Large File Storage?

Git LFS is an open source solution and toolset for versioning large files in Git. The tool is built with Go and is open source on GitHub. It works by extending the Git client, allowing it to integrate with and be compatible with the native Git client. The design of Git LFS makes handling large files feel no different from using standard Git commands. In other words, Git LFS is completely transparent to the user.