您的位置:首页 > 其它

git上传大文件错误修改方法

2016-12-26 12:32 260 查看

git上传大文件错误修改方法

错误提示

Counting objects: 15, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (13/13), 150.22 KiB | 92 KiB/s, done.
Total 13 (delta 6), reused 0 (delta 0)
remote: warning: File data/test.xml is 64.00 MB; this is larger than GitHub's recommended maximum file size of 50 MB
remote: warning: File data/test.xml is 64.00 MB; this is larger than GitHub's recommended maximum file size of 50 MB
remote: error: GH001: Large files detected.
remote: error: Trace: e6ade98208c08b634ed28aefea36dfbb
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File data/test.xml is 128.00 MB; this exceeds GitHub's file size limit of 100 MB
To git@github.com:bobbyg603/goddard.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@github.com:xiaolin/test.git'


如果遇到这样的错误(如果大文件不需要上传到git仓库中去的话)可以这样修改,去上传已经在缓存文件中提交的这些大文件。如:

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch data/test.xml'


希望有帮助!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git
相关文章推荐