

How to upload large file to your Github repository? Git-LFS can help!
source link: https://zeqiang.fun/post/techstack/github_lfs/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

How to upload large file to your Github repository? Git-LFS can help!
Experiencing the 10 min video presentation submission, there is an increasing demand for uploading the large file(>100MB) to my github. This hand-by-hand tutorial can tell you how to work with large files in remoting repositories.
Install
follow the Git LFS
home page to install this package
The recommended method of installing is The binary packages installing
Once you download the file such as git-lfs-darwin-amd64-v2.13.2.zip
Unzip this folder and input cd /Your/Path/git-lfs-darwin-amd64-v2.13.2
to locate this binary folder path.
Then input the following codes to install Git LFS binaries onto the system $PATH
./install.sh
To set the global settings
git lfs install
Usage
Use cd YOUR_PATH
to locate your repo path, and add your target file to lfs branch (using the following codes)
git lfs track "*.geojson"
Then add this file request to your commit
git add my.geojson
git commit -m "add geojson"
Double check if you successfully manage your geojson file
git lfs ls-files
This means you are managing your large file if the output result is 3c2f7aedfb * my.geojson
Then using thegit push origin main
OR git push
to push your commit to submit your large file to your Github repo.
If you want to remove this large file, then input the following codes
git lfs migrate export --include="*.geojson" --everything
Reference
Markdown Cheatsheet Web Development Group Project: Project Abeona - UK Traffic Accidents Studying
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK