Title: git-lfs notes
comments: true
categories: notes
tags:
I always wanted to find a file that can store a large file and it can be operated like git.
starts preparing for self-built svn to meet demand
After seeing some of github's documentation, I saw the git lfs (Git Large File Storage) feature.
Just understand it. By the way, take note of this note.
Common git repository sites offer git lfs storage such as github
Any commands in the notes have been executed in ubuntu
Git lfs supports direct binary installation, various package management tool installations (apt, yum, pacman, etc.)
#install git lfs
sudo apt install git-lfs
# Initialize git lfs
sudo git lfs install
Initialize the lfs configuration file
Git lfs track "<directory>/*"
Executing the above command will generate .gitattributes in the root of the project.
The content is roughly as follows
<directory>/* filter=lfs diff=lfs merge=lfs -text
sudo git add .gitattributes
sudo commit -m "init git lfs config"
Copy large files to <directory>
Sudo git add <directory>/xxx
sudo git commit -m "update xxx"
sudo git push
File updates based on git lfs management will be displayed as
Git LFS: (1 of 1 files) 9.18 KB / 9.18 KB
In the object count: 10, completed.
。。。。。。。。
sudo apt --purge remove git-lfs
#View git global configuration
git config -l
# Delete and lfs related configuration
## View lfs related configuration
git config -l|grep lfs
##
git config --global --unset filter.lfs.clean
git config --global --unset filter.lfs.smudge
git config --global --unset filter.lfs.process
git config --global --unset filter.lfs.required
git config --global --unset filter.lfs.required
# Delete lfs warehouse address Delete as needed
git config --global --unset lfs.https://github.com/xuxianyu/blog.git/info/lfs.access
The function of git is getting more and more hanged. Now I can manage large files well.
git is just a pointer to a large file. It is not responsible for storage. It still keeps git efficient and easy to use. But there is a batch that can manage large files.
Git LFS, the full name Git Large File Storage, is a solution that Github took the lead in launching in 2015. There are currently two free warehouses in China: Tencent's "Tencent Worker Bee" ...
Set user information Set Git user name and email: (if this is the first time) 1. Configure username 2. Configure Email 3. Generate the key Enter 3 consecutively. If no password is required. Finally, t...
Use git-lfs for the first time, install it, execute after installationgit lfs pull, Error: The translation of the literal means that the LFS is not installed, so I go to install LFS and still report a...
1. Installation installationGit Enter the official websiteGitHub LFSDownload and installGitHub LFS 2. Enter Github's local repository directory to initialize LFS 3. Manage large files with git lfs Use...
Use GIT-LFS to upload large files (over 50M) Recently, when using git, I encountered the problem that files exceeding 50M were too large to be uploaded, and git-lfs was used to solve it. git-lfs downl...
welcome to my blog 1. View the CPU architecturelscpu 2. Download the corresponding version of the linux installation package,download link Just download the latest version, the latest version I downlo...
The company's computer controls, you can't log in to any account, and there is a size limit for email reception, so there are many books and materials that you have collected, and notes that are diffi...
Brief description If someone else used the lfs strategy when creating a warehouse, how should you clone this warehouse? The following is a detailed tutorial. Note: lfs is Large File Storage. Using the...
1. Background Colleagues in the development team found that there are large files in the git project, and the local git cache file is relatively large, which makes it impossible to clone. To solve thi...
Reference page...