我试图将提交推送,但远程返回错误如下:
Counting objects: 11277, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4759/4759), done.
Writing objects: 100% (11277/11277), 76.66 MiB | 0 bytes/s, done.
Total 11277 (delta 7512), reused 9645 (delta 6340)
remote: warning: Large files detected.
remote: error: File
"DreaMove/main/Classes/ChatVC/\344\272\262\345\212\240/libgotyeapi_c++11.a" is 134.87 MB; this exceeds Git@OSC's file size limit of 100 MB
remote: error: hook declined to update refs/heads/master
To https://git.oschina.net/maxLoveCode/Yuepai.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'https://git.oschina.net/maxLoveCode/Yuepai.git'libgotyeapi_c++11.a超过100 is,但我尝试了两者。
git rm libgotyeapi_c++11.a和
git rm --cache libgotyeapi_c++11.a但是我仍然不能通过push -f命令来推送代码
我也试过这样的命令
git filter-branch -f --index-filter'git rm --cached --ignore-unmatch DreaMove/main/Classes/ChatVC/\344\272\262\345\212\240/libgotyeapi_c++11.a' 重写提交历史记录,但仍然不起作用。请帮帮我已经干了好几个小时了!
发布于 2015-09-23 01:49:03
我用git rebase -i来清理git历史记录。
根据Zloj在评论中发布的链接。
虽然大文件已从当前提交中删除,但它已出现在历史提交中。遥控器中的git钩子检测到该文件,然后拒绝强制推送。
检查How to remove/delete a large file from commit history in Git repository?中最高的向上投票的答案
但请记住备份您的作品之前,任何修剪行动,你的历史提交!
https://stackoverflow.com/questions/32713058
复制相似问题