设为首页 加入收藏

TOP

hook declined to update refs/heads/dev
2019-08-26 07:03:50 】 浏览:30
Tags:hook declined update refs/heads/dev

提交一个项目,push的时候,报错:

warning: Large files detected.
remote: error: File TaodangpuAuction/TaodangpuAuction/AuctionClasses/Discover/TXLiteAVSDK/TXLiteAVSDK_UGC.framework/TXLiteAVSDK_UGC is 120.68 MB; this exceeds file size limit of 100.0 MB
remote: error: hook declined to update refs/heads/dev
To https://gitee.com/doubleyao1116/JianHuo.git
 ! [remote rejected]   dev -> dev (hook declined)
error: failed to push some refs to 'https://gitee.com/doubleyao1116/JianHuo.git'
bogon:天天鉴定dev mac$ 

原因是有一个文件超过了git服务器对文件大小的限制。

删掉本地文件,再推,还是报错。加忽略文件,再推也是报错。回滚,再推,还是同样的错误。

最后发现是这个大文件已经保存到了log中,因此无论怎么删改,这个文件没有从log中剔除就总会报出相同的错误。所以要在日志中把这个文件删除即可。

命令如下:

git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch xxx.rar" -- --all

上面的xxx.rar就是上面上传的大文件

git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch TaodangpuAuction/TaodangpuAuction/AuctionClasses/Discover/TXLiteAVSDK/TXLiteAVSDK_UGC.framework/TXLiteAVSDK_UGC" -- --all

上面的过程会很长,不要担心,看见扫描的文件一个一个的变少,那就是离成功更近了。

最后再git push就好了

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇记,NSProxy需要实现哪些方法? 下一篇Fastlane基础介绍

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目