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

hook declined to update refs/heads/dev的更多相关文章

  1. remote: error: hook declined to update refs/heads

    打开工程目录下.git/config文件,补充user信息 , [user] username = xxx email = xxx@126.com 打开工程目录下.git/description文件, ...

  2. git:hook declined FATAL: W refs/heads DENIED by fallthru error

    hook declined FATAL: W refs/heads DENIED by fallthru error git提交代码时报错,网上查了,最终结果竟然是测试人员没有给我配置写的权限,配置了 ...

  3. git remote: error: hook declined to update

    提交一个项目,push的时候,报错: remote: error: File xxx.rar is MB; this exceeds Git@OSC's file size limit of 100 ...

  4. gitlab hook declined错误

    在向gitlab提交工程的时候,出现错误提示: remote: GitLab: You are not allowed to access master!remote: error: hook dec ...

  5. "remote:error:refusing to update checked out branch:refs/heads/master"的解决办法(转)

    https://blog.csdn.net/jacolin/article/details/44014775 在使用Git Push代码到数据仓库时,提示如下错误: [remote rejected] ...

  6. To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'ssh://xxx.com:8022/test/project.git'

    To ssh://xxx.com:8022/test/project.git ! [remote rejected] master -> master (pre-receive hook dec ...

  7. Git push时报错 ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to......

    今天在使用Git回退到之前某个版本的代码时,进行push时出现如下错误: ! [remote rejected] master -> master (pre-receive hook decli ...

  8. 关于refs/for/ 和refs/heads/

    1.     这个不是git的规则,而是gerrit的规则, 2.     Branches, remote-tracking branches, and tags等等都是对commite的引用(re ...

  9. Git push提示pre-receive hook declined

    master:local auto@ubuntu:~/src/code/ git push Counting objects: 5, done. Delta compression using up ...

随机推荐

  1. Winform中怎样在工具类中对窗体中多个控件进行操作(赋值)

    场景 需求是在窗体加载完成后掉用工具类的方法,工具类中获取窗体的多个控件对象进行赋值. 注: 博客主页: https://blog.csdn.net/badao_liumang_qizhi 关注公众号 ...

  2. Selenium(十九):unittest单元测试框架(五) Page Object设计模式

    1. Page Object设计模式 Page Object是Selenium自动化测试项目开发实践的最佳设计模式之一,它主要体现在对界面交互细节的封装,这样可以使测试方案更关注于业务而非界面细节.从 ...

  3. 前端JS实现一键导入excel表格

    前面的文章中已经讲过关于js表格的导出,此文章主要说到的是excel文件如何导入到网页中,并在网页端显示. 代码部分: <!DOCTYPE html> <html> <h ...

  4. GitHub最强技术面试手册:Tech Interview Handbook

    摘要: 求职还是需要认真准备的. 原文:超实用技术面试手册,从工作申请.面试考题再到优势谈判,GitHub获30000星 作者:量子位 技术人员求职面试,单刷leetcode上的大厂题库可能还不够. ...

  5. Linux-3.14.12内存管理笔记【构建内存管理框架(1)】

    传统的计算机结构中,整个物理内存都是一条线上的,CPU访问整个内存空间所需要的时间都是相同的.这种内存结构被称之为UMA(Uniform Memory Architecture,一致存储结构).但是随 ...

  6. postman---postman导出python脚本

    前面一直写关于postman的一些文章,大家现在都应该简单了解,其实postman还有许多的功能,这个要大家一点点的挖掘出来了,安静在给大家分享一个关于postman导出python脚本 Postma ...

  7. 克服悲伤情绪的三个P原则

    1.自责(Personalization) --不要自责 2.永久化(Permanence) --悲伤不会永远存在,一切都会过去 据科学研究发现:人遇到开心或悲伤的事情之后,心情在短期内会产生巨大的波 ...

  8. Java之Scanner类

    Scanner类概述 一个可以解析基本类型和字符串的简单文本扫描器.简而言之,Scanner类的功能:可以实现键盘输入数据,到程序当中. 例如,以下代码使用户能够从 System.in 中读取一个数. ...

  9. pytest框架之rerunfailures失败重运行机制

    web自动化测试中,稳定性在整个测试运行中都至关重要,但不能保证测试脚本或者测试环境一直都能够稳定,它牵扯到诸多因素,在这里就不赘述,pytest框架相较于unittest的一大优势就在于拥有用例失败 ...

  10. 解决 canvas 下载含图片的画布时的报错

    Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may no ...