Requirements: Let's say you're developing a game project with a large number of textures, models, and sound effects. These files are usually binary and bulky. How should I manage it with git?
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers within Git while storing file content on a remote server like GitHub.com or GitHub Enterprise.
Git Large File Store (LFS) is an open-source Git extension that helps Git repositories efficiently manage large binaries. Git can't track changes to binaries like audio, video, or image files in the same way that text file changes. While text-based files can generate plain text diffs, any changes to binaries require Git to completely replace the files in the repository. Repeated changes to large files increase the size of the repository. This increase in size slows down regular Git operations like clone, fetch, or pull over time.
LFS Official Website:The hyperlink login is visible. GitHub address:The hyperlink login is visible.
First, install the extension, taking Windows as an example, download the address:The hyperlink login is visible.
The installation process is simple.
Initialize Git LFS,It only needs to be done once the installation is complete, the command is as follows:
View version commands:
Specify the file type to track, using the .mp4 file as an example, the command is as follows:
To see which files are LFS managed, the command is as follows:
If you want to clone a project, unlike downloading the contents of large files managed by LFS right away, the command is as follows:
(End) |