hook declined to 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就好了
hook declined to update refs/heads/dev的更多相关文章
- remote: error: hook declined to update refs/heads
		打开工程目录下.git/config文件,补充user信息 , [user] username = xxx email = xxx@126.com 打开工程目录下.git/description文件, ... 
- git:hook declined FATAL: W refs/heads DENIED by fallthru error
		hook declined FATAL: W refs/heads DENIED by fallthru error git提交代码时报错,网上查了,最终结果竟然是测试人员没有给我配置写的权限,配置了 ... 
- 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 ... 
- gitlab hook declined错误
		在向gitlab提交工程的时候,出现错误提示: remote: GitLab: You are not allowed to access master!remote: error: hook dec ... 
- "remote:error:refusing to update checked out branch:refs/heads/master"的解决办法(转)
		https://blog.csdn.net/jacolin/article/details/44014775 在使用Git Push代码到数据仓库时,提示如下错误: [remote rejected] ... 
- 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 ... 
- 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 ... 
- 关于refs/for/ 和refs/heads/
		1. 这个不是git的规则,而是gerrit的规则, 2. Branches, remote-tracking branches, and tags等等都是对commite的引用(re ... 
- Git push提示pre-receive hook declined
		master:local auto@ubuntu:~/src/code/ git push Counting objects: 5, done. Delta compression using up ... 
随机推荐
- SSM整合1(springMVC+mybatis)
			整合目标:控制层采用springmvc.持久层使用mybatis实现 整合思路: Dao层: 1.SqlMapConfig.xml,空文件即可,但是需要文件头. 2.applicationContex ... 
- BeautifulSoup的重要操作
			BeautifulSoup相关概念总结:https://www.cnblogs.com/pythonywy/p/11134481.html css基础以及选择器基础:https://www.cnblo ... 
- SVN 回滚提交的代码
			有的时候,代码提交错了,我们可以通过SVN回滚到指定的版本,然后在提交回滚后的代码,即为撤销提交. 回滚代码 重新提交刚才回滚后的代码 
- CAD转DXF怎么转换?教你三种转换方法
			CAD图纸在我们日常生活中都是可见到的,因为CAD图纸文件的格式是多样的,在工作中就需要经常将CAD的格式进行转换.那CAD转DXF怎么转换呢?这个问题很多的小伙伴们都遇到过,下面小编就来教大家三种转 ... 
- python判断字符串中是否包含子字符串
			python判断字符串中是否包含子字符串 s = '1234问沃尔沃434' if s.find('沃尔沃') != -1: print('存在') else: print('不存在' ... 
- CSS学习笔记-背景属性
			一.背景尺寸属性: 1.含义: 背景尺寸属性是CSS3中新增的一个属性,专门用于设置背景图片大小 2.格式: 1.1具体像素: backgro ... 
- UIView设置阴影
			UI设计师有时候希望我们的产品比较酷. 阴影是他们喜欢的效果之一. 怎么设置阴影呢? 1.设置一个四边都相同的阴影 UIImageView *testImgView = [[UIImageView a ... 
- retrying failed action with response code: 403
			0x00 Event [2019-09-24T19:22:31,655][INFO ][logstash.outputs.elasticsearch] retrying failed action w ... 
- nginx——keepalived
			nginx--keepalived 1.keepalived高可用基本概述 什么是高可用 一般是指2台机器启动着完全相同的业务系统,当有一台机器down机了,另外一台服务器就能快速的接管,对于访问的用 ... 
- Error 1327 Invalid Drive 的解决办法
			出现场景: 当我在安装STM32公司的 STM32 ST-LINK Utility v4.5.0 软件时,弹出了这个错误.弹框的内容大体是说找不到D盘,这里忘记截图了. 我的电脑的硬盘是我另一 ... 
