首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >git推送文件超过100 of的限制。

git推送文件超过100 of的限制。
EN

Stack Overflow用户
提问于 2015-09-22 09:16:54
回答 1查看 1.1K关注 0票数 0

我试图将提交推送,但远程返回错误如下:

代码语言:javascript
运行
复制
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,但我尝试了两者。

代码语言:javascript
运行
复制
git rm libgotyeapi_c++11.a

代码语言:javascript
运行
复制
git rm --cache libgotyeapi_c++11.a

但是我仍然不能通过push -f命令来推送代码

我也试过这样的命令

代码语言:javascript
运行
复制
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' 

重写提交历史记录,但仍然不起作用。请帮帮我已经干了好几个小时了!

EN

Stack Overflow用户

回答已采纳

发布于 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?中最高的向上投票的答案

但请记住备份您的作品之前,任何修剪行动,你的历史提交!

票数 1
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32713058

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档