1,单个文件建议不超过50M
warning:this is larger than GitHub’s recommended maximum file size of 50.00 MB
2,单个文件禁止超过100M
error:this exceeds GitHub’s file size limit of 100.00 MB
3,解决方案(使用Git Large File Storage)
3.1 安装(在MAC上使用Homebrew安装)
brew install git-lfs
3.2 选择您希望Git LFS管理的文件类型(或直接编辑.gitattributes)。您可以随时配置其他文件扩展名。这一步成功后会生成一个gitattributes文件
git lfs track “* .txt” # 这里的 “ *.txt "就是你要上传的大文件的路径
3.3 添加并commit .gitattributes文件
git add .gitattributes
git commit .gitattributes
git push
Note:要单独将.gitattributes文件push到远端后再来对具体的大文件进行操作
3.4 添加并commit 大文件
git add “*.txt”
git commit
git push