[git] github upload large files

The github client supports up to 100Mb file upload. If you want to upload more than 100M, you can only use git-lfs, but the test found that even if you use git lfs, I can’t upload 2.5GB. The test is 737M files. The total storage capacity of GitHub’s current Git LFS is 1G Around, more than need to pay. (When the upload fails, you can open the VPN to upload). process

The first step: Create a new warehouse in github, and then git clone to the local

Step 2: Switch to the project directory

git lfs track xxx.zip
git add .
git commit -m "随便写"
git push

Here are some commonly used commands:

git lfs track '*.pbix'  #告知LFS管理文件类型
git lfs track 查看LFS管理的所有类型文件
git add .  #将工程文件全部添加进commit提交列表中
git commit -m 'Add new large assets' #附加提交日志
git lfs ls-files #查看LFS管理了哪些文件
git push #全仓库推送
cd upload #进入名为upload的文件夹,提前将要上传的大文件放入该文件夹下
git init #创建本地仓库环境
git lfs install #安装大文件上传应用
git lfs track * #追踪要上传的大文件,*表示路径下的所有文件
git add .gitattributes #添加先上传的属性文件(要先上传属性文件,不然有可能失败)
git commit -m "pre" #添加属性文件上传的说明
git remote add origin https://github.com/xxxx.git #建立本地和Github仓库的链接,.git链接在网页端clone的HTTPS中获取
git push origin master #上传属性文件
git add * #添加要上传的大文件,*表示路径下的所有文件
git commit -m "Git LFS commit" #添加大文件上传的说明
git push origin master #上传大文件
git pull --rebase origin master
git push -u origin master

Guess you like

Origin blog.csdn.net/FL1623863129/article/details/132401685