提交一个项目,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就好了

转载于:https://www.cnblogs.com/jingxin1992/p/11024095.html

hook declined to update refs/heads/dev相关推荐

  1. 阿里云代码超限2040M remote: error: hook declined to update refs/heads

    1 修改配置文件法 remote: error: hook declined to update refs/heads https://www.cnblogs.com/lanrumeng/p/1231 ...

  2. git错误:exceeds file size limit of 100.0 MB remote: error: hook declined to update refs/heads/master

    今天在git上提交了一个大于100M的文件,结果发现报错如下: remote: warning: Large files detected. remote: error: File a/b/c is ...

  3. 【Git】Git commit至Gitee报错‘remote: error: hook declined to update refs/heads/master‘的解决方法

    Git commit至Gitee报错'remote: error: hook declined to update refs/heads/master'的解决方法 进入到Gitee的邮箱管理中,取消勾 ...

  4. Git commit至Gitee报错‘remote: error: hook declined to update refs/heads/master‘的解决方法

    进入到Gitee的邮箱管理中,取消勾选禁止命令行推送暴露个人邮箱

  5. error: dst ref refs/heads/dev receives from more than one src.

    使用git push origin a:a 提示一下错误: error: dst ref refs/heads/dev receives from more than one src. error: ...

  6. remote: error: cannot lock ref ‘refs/heads/dev/mz/dev‘: ‘refs/heads/dev‘ exists; cannot create ‘refs

    remote: error: cannot lock ref 'refs/heads/dev/mz/dev': 'refs/heads/dev' exists; cannot create 'refs ...

  7. git push时出现错误refusing to update checked out branch: refs/heads/master

    错误描述 使用tortoisegit push的时候如下错误 Writing objects: 100% (3/3), 258 bytes | 0 bytes/s, done. Total 3 (de ...

  8. it : Tmaster (hook declined) error: failed to push some refs to https://xxx/biluo/xxx.git

    To https:///biluo/xxx.git! [remote rejected] master -> master (hook declined) error: failed to pu ...

  9. 【git私服推送文件出现的问题】refusing to update checked out branch: refs/heads/master

    "remote:error:refusing to update checked out branch:refs/heads/master"的解决办法 转载:http://www. ...

  10. git push报错:remote: error: refusing to update checked out branch: refs/heads/master

    远程仓库通过git init初始化了一个项目,没有clone到本地,本地新建了一个项目,关联本地项目和远程仓库(参见IDEA新建本地项目关联远程git仓库 )后git push报错: wulf@wul ...

最新文章

  1. 最新NLP架构的直观解释:多任务学习– ERNIE 2.0(附链接)| CSDN博文精选
  2. BL1551模拟开关,封装SC70-6
  3. 设计模式的征途—17.模板方法(Template Method)模式
  4. Apache ZooKeeper - 选举Leader源码流程深度解析
  5. JAVA项目实训struts2_Java Web项目搭建过程记录(struts2)
  6. java 本地发送邮件_java在本地发送邮件可以,在服务器发送报错
  7. html5纪念日期代码,HTML5适合的情人节礼物有纪念日期功能
  8. 【Pytorch神经网络基础理论篇】 08 Softmax 回归 + 损失函数 + 图片分类数据集
  9. jQuery中$.get()、$.post()和$.ajax()
  10. 【Spring学习笔记-0】Spring开发所需要的核心jar包
  11. mysql数据库优化 分析工具 性能瓶颈
  12. TinyMC编辑器简介
  13. PDF转换成WORD方法与转换器大全
  14. linux文件解压缩加解密
  15. 如何在 Windows 中删除运行历史记录
  16. APK文件如何查看源代码
  17. aws ebs 分析_使用AWS Comprehend进行情感分析
  18. OSS简单上传下载整理
  19. php 编码转换 乱码解决
  20. 深入操作系统底层分析nginx网络请求及响应过程

热门文章

  1. 样本标准差分母为什么是n-1
  2. Pr入门系列之十:添加视频效果
  3. 普莱得电器递交注册:上半年营收3.7亿 拟募资5.6亿
  4. word排版快捷指令_Word怎么快速排版?这12招Word排版小技巧,3分钟完成一个Word文档...
  5. 设定目标需要注意的事项
  6. 网易公开课中英字幕文件合并代码
  7. 英语语法篇 - 动词的分类和形式
  8. 3DGPS数据图和3D圆轨道图
  9. 微信公众号 自定义菜单跳转html页面 前端获取code,openid
  10. OpenCC的编译与多语言使用