今天在git push的时候居然出现了一个自己从未见过的问题
error: hook declined to update refs/heads/detail-header

仔细阅读了下面一大段话

 C:\Users\Administrator\Desktop\travel>git push
Counting objects: 47, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (44/44), done.
Writing objects: 100% (47/47), 347.23 MiB | 1.48 MiB/s, done.
Total 47 (delta 13), reused 0 (delta 0)
remote: Powered By Gitee.com
remote: warning: Large files detected.
remote: error: File src/assets/style/img/nox_setup_v6.3.0.6_full.exe is 348.04 MB; this exceeds filesize limit of 100.0 MB
remote: error: hook declined to update refs/heads/detail-header
To gitee.com:bangbangboom/travel.git! [remote rejected] detail-header -> detail-header (hook declined)
error: failed to push some refs to '这里删掉不po出来了哈哈哈'

从里面提示的warning,error看就是有个文件台太大了啊喂

remote: warning: Large files detected.
remote: error: File src/assets/style/img/nox_setup_v6.3.0.6_full.exe is 348.04 MB; this exceeds filesize limit of 100.0 MB

里面这个“src/assets/style/img/nox_setup_v6.3.0.6_full.exe”文件已经超过了100.0MB了。
原来码云上不允许单文件超过100m,自己在提交的时候无意中加入了一个大文件,此时因为已经git 过,也commit了,如果你只是直接删除了那个文件是不起作用的,那个大文件已经保存在log中了,因此你需要删除掉的是rm
百度了大家就是用以下命令操作的

git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch FOLDERNAME" -- --all

把命令行里面的 FOLDERNAME 替代成你那个要删除的文件
例如我的

git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch **src/assets/style/img/nox_setup_v6.3.0.6_full.exe** -- --all

再重新push一下
问题解决嘻嘻~

git push时报错: hook declined to update refs/heads/detail-header相关推荐

  1. 【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的邮箱管理中,取消勾 ...

  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. 阿里云代码超限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 ...

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

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

  5. git push时报错Warning: Identity No such file or directory Name or service not known

    在使用git push -u origin master时,始终报下面的错误: Warning: Identity file C:/Program not accessible: No such fi ...

  6. git push时报错fatal: Could not read from remote repository.

    后来发现,出现这个问题是因为仓库地址不对 使用如下命令先查看一下: $ git remote -v 发现跟github的地址不一致 然后在终端输入:git remote set-url origin ...

  7. git push时报错error: File: xxx 252.15 MB, exceeds 100.00 MB.

    原因: 文件过大,不能超过100M 1. 查看哪个文件超过了100M git rev-list --objects --all | grep xxx 2. 从缓存中删除 git filter-bran ...

  8. windows git fetch 时报错error: cannot lock ref ‘refs/remotes/origin/feature-1‘: there is a non-empty di

    解决方式   看报错知道是存在feature-1这样的分支,导致在fetch或者pull的时候,发现该分支不为空而失败:同理其他cannot lock ref提示的错误也是相关分支异常导致.   处理 ...

  9. 解决git在push时报错fatal: unable to access ‘https://github.com/sup0C/a.git/‘: errno 10054

    解决git在push时报错fatal: unable to access 'https://github.com/sup0C/a-repository-for--git/': OpenSSL SSL_ ...

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

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

最新文章

  1. 在Linux下正确安装VMWARE TOOLS
  2. 多线程, 注入spring 服务
  3. [k8s]k8s pod的4种网络模式最佳实战(externalIPs )
  4. 如何为你的代码选择一个开源协议
  5. 1066 Root of AVL Tree (25 分)【难 / 知识点: 平衡树 未完成】
  6. PHP安装zip拓展,以及libzip安装问题
  7. 基于php在线相册,基于PHP的图片相册管理分享系统设计
  8. linux rs232触摸屏驱动程序,Linux下的触摸屏驱动
  9. MySQL性能优化之必备技能【推荐】
  10. java定时任务什么时间e结束_Java定时任务
  11. Codeforces 1194B+1194D
  12. 循环结构:while和do...while循环语句
  13. 华为手机解析出现问题
  14. 英语口语175之每日十句口语
  15. 新疆高一计算机学业水平测试,2017年新疆高中学业水平考试科目
  16. 炬芯平台SPP私有协议调试
  17. SitePoint播客#136:政府发布的单个浏览器
  18. 重磅更新 | zData数据库一体机 v4.9
  19. 【EMC专题】电磁辐射的危害
  20. AFEPack 使用 Tutorial(一):解二维泊松方程

热门文章

  1. HTML5期末大作业:关于家乡介绍的HTML网页设计——郑州美景HTML+CSS(5页) 学生DW家乡介绍网页设计作业成品 web课程设计网页规划与设计
  2. 云计算认证系列:CKA认证
  3. VUE 组件 有数据不渲染 v-for
  4. C语言 哲学家就餐问题
  5. 卫星定位领域相关基础知识汇总
  6. 物联网之智能家居系统设计和实现
  7. Windows 技术篇-win10、win7设置电脑自动锁屏(非关闭显示器),设置电脑黑屏并锁屏方法
  8. Hamilton哈密顿最短路径(二进制状态压缩)
  9. JS中的this是什么,this的四种用法
  10. ie edge浏览记录文件_如何在Microsoft Edge中清除浏览历史记录