git bash上传大文件到github

GitHub默认最高支持单次上传文件100MB

git-lfs:git large file storage

下载git lfs工具

https://git-lfs.github.com/

命令

在工作目录打开git bash。

# 1. 启用lfs
 git lfs install
 
# 2. 要上传的文件,这里指定目录下的所有pdf文档
git lfs track "*.pdf"

# 3. 添加gitattributes文件
 git add .gitattributes
 
# 4. 指定pdf文件加入本地仓库
git add *.pdf

# 5. 上传描述
git commit -m "your desp"

# 6. 上传到main分支
git push origin main


参考 document

猜你喜欢

转载自blog.csdn.net/qq_44783283/article/details/112756655
今日推荐