Git large file storage will help Git process large binary files
GitHub announced that as an open-source Git extension, the goal of the Git Large File Storage (LFS) is to better put "Large binary files, for example, audio files, datasets, images, and videos are integrated into Git workflows.
As we all know, Git is inefficient at storing binary files because:
By default, Git compresses and stores all the complete versions of binary files. If there are many binary files, this approach is obviously not optimal.
Git LFS handles large binary files by replacing them with "text Pointers. These text pointers are actually text files that contain binary file information. Text pointers are stored in Git, while large files are hosted on the Git LFS server over HTTPS.
Git LFS adds a new command to Gitlfs
The following parameters are supported:
- Config: displays the configuration of Git LFS.
- Init: Initialize Git LFS.
- Logs: displays errors in git-lfs.
- Track: Add a large file to the Git repository; the file extension can be specified.
- Untrack: Remove a file from Git LFS.
- Push: push the currently monitored files to the Git LFS server.
- Status: displays the path of the Git LFS object that has been modified.
To add a large file to an existing warehouse, you can:
git lfs track "*.pdf"git add file.pdfgit commit -m "Add design file" git push origin master
According to GitHub official news, there are currently only two types of Git LFS Server API implementation: Reference server implementation and GitHub.com, which are currently unavailable. GitHub has released a free LFS plan, which allows up to 1 GB of free file storage space and 1 GB of traffic per month ". A plan with a larger capacity needs to be paid, but the specific fee has not yet been announced.
Before the advent of Git LFS, developers can use git-annex to manage large binary files. The latter is a Git extension. The principle is similar to that of Git LFS. The file content is stored in. git/annex, and the symbolic links at the corresponding locations are stored in the Git repository.
Git Large File Storage Promises to Extend Git to Large Binary Files
GitHub Tutorials:
GitHub tutorials
Git tag management details
Git branch management
Git remote repository details
Git local Repository (Repository) Details
Git server setup and Client installation
Git Overview
Share practical GitHub tutorials
Git details: click here
Git: click here
This article permanently updates the link address: