This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1351|Reply: 1

Git lfs large file versioning control

[Copy link]
Posted on 2025-1-9 14:29:57 | | | |
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)




Previous:Use Onnx model inference to warn of CleanUnusedInitializersAndNodeArgs issues
Next:[Translation]. NumSharp array slicing function in NET/C#
 Landlord| Posted on 2025-1-9 14:36:21 |
Clone large file projects



.gitattributes file specifies which types of files should be managed using LFS, and the file configuration is as follows:




Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com