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

remote: error: File xxx.rar is  MB; this exceeds Git@OSC's file size limit of 100 MB
remote: error: hook declined to update refs/heads/master …… ! [remote rejected] master -> master (hook declined)

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

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

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

命令如下:

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

然后再Push即可。

git remote: error: hook declined to update的更多相关文章

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

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

  2. hook declined to update refs/heads/dev

    提交一个项目,push的时候,报错: warning: Large files detected. remote: error: File TaodangpuAuction/TaodangpuAuct ...

  3. Git remote: ERROR: missing Change-Id in commit message

    D:\code\项目仓库目录>git push origin HEAD:refs/for/dev/wangteng/XXXXX key_load_public: invalid format E ...

  4. gitlab hook declined错误

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

  5. 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 ...

  6. 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 ...

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

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

  8. git push解决办法: ! [remote rejected] master -> master (pre-receive hook declined)

    前天准备上传一个project到GitLab上,但是试了很多次都上传不上去,报错如下: ! [remote rejected] master -> master (pre-receive hoo ...

  9. Git push提示pre-receive hook declined

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

随机推荐

  1. LCTF wp简单复现

    1.T4lk 1s ch34p,sh0w m3 the sh31l 代码如下: <?php $SECRET = `../read_secret`; $SANDBOX = "../dat ...

  2. 4、Web Service-Jaxws(Eclipse版本)实现查看天气和手机归属地

    1.前提概要 免费的官网:http://www.webxml.com.cn/zh_cn/web_services.aspx 官网提供了各种免费的webservice 我们使用的是:http://ws. ...

  3. Mysql 创建普通用户、数据库、表、插入记录,用户赋权

    C:\phpStudy\MySQL\bin>mysql -uroot -proot -h127.0.0.1 //创建用户 mysql> insert into mysql.user (ho ...

  4. leetcode231 2的幂 leetcode342 4的幂 leetcode326 3的幂

    1.2的幂 正确写法: class Solution { public: bool isPowerOfTwo(int n) { ) return false; )) == ; } }; 错误写法1: ...

  5. PAT——1029. 旧键盘

    旧键盘上坏了几个键,于是在敲一段文字的时候,对应的字符就不会出现.现在给出应该输入的一段文字.以及实际被输入的文字,请你列出肯定坏掉的那些键. 输入格式: 输入在2行中分别给出应该输入的文字.以及实际 ...

  6. CSS节选——选择器

    CSS,cascading style sheet,层叠样式表,请留意层叠概念. css3为了区分伪类和伪元素,伪元素采用双冒号写法. 常见伪类——:hover,:link,:active,:targ ...

  7. 树概念及使用connect by进行级联查询

    树 树,大家都见过,以这种形式的数据关系,就是树.下面看一张图,了解什么是根节点(树干).节点或分叉.叶(叶节点) connect by 级联查询 connect by可以用于级联查询,常用于对具有树 ...

  8. 纯javascript实现选择框的全选与反选

    HTML部分 <div id="wrap_input_box" > <input type="checkbox"><br> ...

  9. C++程序设计入门 引用和动态内存管理学习

    引用: 引用就是另一个变量的别名,通过引用所做的读写操作实际上是作用于原变量上. 由于引用是绑定在一个对象上的,所以定义引用的时候必须初始化. 函数参数:引用传递 1.引用可做函数参数,但调用时只需 ...

  10. java 关于String

    1.两种创建方式 String str1 = "abc"; //字面量创建 String str2 = new String("abc"); //构造方法创建 ...