GitHub 上传文件过大报错:remote: error: GH001: Large files detected.
1.查看哪个文件过大了
报错信息:
remote: Resolving deltas: 100% (24/24), completed with 3 local objects.
remote: warning: File CPT_0707_ao/temp_past/temp2/deltap.csv is 71.69 MB; this is larger than GitHub's recommended maximum file size of 50.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: c42ade10239deffc45c2a2800135e242
remote: error: See http://git.io/iEPt8g for more information.
To https://github.com/******
! [remote rejected] master -> master (pre-receive hook declined)
可以发现,是CPT_0707_ao/temp_past/temp2/deltap.csv 文件太大,超过了50Mb的限制。那么要处理的就是这个文件了。
2.重写commit,删除大文件
git filter-branch --force --index-filter 'git rm -rf --cached --ignore-unmatch CPT_0707_ao/temp_past/temp2/deltap.csv' --prune-empty --tag-name-filter cat -- --all
\(\color{red}{P.S.}\)如果报错:
Cannot rewrite branches: Your index contains uncommitted changes.
解决:
git stash
3.推送修改后的repo
git push origin master --force
4.清理和回收空间
虽然上面我们已经删除了文件, 但是我们的repo里面仍然保留了这些objects, 等待垃圾回收(GC), 所以我们要用命令彻底清除它, 并收回空间,命令如下:
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
彻底解决。
引用:https://blog.csdn.net/qq997843911/article/details/88979051
GitHub 上传文件过大报错:remote: error: GH001: Large files detected.的更多相关文章
- ASP.NET Uploadify 上传文件过大报错
Uploadify上传文件原来很早之前用过,没发现什么问题.今天再使用过程中,当文件大于30M的时候就会报错404.查看错误消息提示配置最大上传太小了.需要修改. 记得原来配置上传文件大小在这里:&l ...
- github上传文件
说来也惭愧,我是最近开始用github,小白一个,昨天研究了一个下午.终于可以上传了,所以今天写点,一来分享是自己的一些经验,二来也是做个记录,万一哪天又不记得了:) 废话不多说,直接来,这次主要介绍 ...
- GitHub上传文件或项目的教程
既然是往GitHub上传文件,那GitHub账号必须得有,这时候就会有同学问:妖怪吧,我没有GitHub账号怎么办? 别急别急,打开GitHub网站https://github.com/,然后注册就O ...
- Ajax上传文件/照片时报错TypeError :Illegal invocation
问题 Ajax上传文件/照片时报错TypeError :Illegal invocation 解决 网上搜索问题,错误原因可能有以下几个,依次检查: 请求类型有误,如post请求,但在后台设置的是ge ...
- 第一次往github上传文件步骤
第一次往github上传文件步骤: 1> 从右上角 '+' 位置下拉菜单中,创建一个repository 2>从右上角头像位置下拉菜单 setting中设置 SSH keys 3>打 ...
- 利用TortoiseGit向Github上传文件
利用TortoiseGit向Github上传文件 第一步:建一个新文件夹,作为本地仓库 第二步:右键选择设置为版本库 若弹出,确认即可 重新打开改文件,会发现多了一个绿色的小勾 在文件夹中会自动生成一 ...
- GitHub上传文件夹
1.输入自己的用户名和邮箱 为注册GitHub账号时所用的用户名和邮箱;我的用户名为“1997ST2016”,邮箱为“1324971964@qq.com ”. $ git config --globa ...
- GitHub上传文件问题总结
问题一:git warning: LF will be replaced by CRLF in 解决办法 在Git Bash中输入git add .时出现上述语句. 解决办法: 输入以下语句: $ g ...
- FTP上传文件,报错java.net.SocketException: Software caused connection abort: recv failed
FTP上传功能,使用之前写的代码,一直上传都没有问题,今天突然报这个错误: java.net.SocketException: Software caused connection abort: re ...
随机推荐
- Kubernetes增强型调度器Volcano算法分析【华为云技术分享】
[摘要] Volcano 是基于 Kubernetes 的批处理系统,源自于华为云开源出来的.Volcano 方便 AI.大数据.基因.渲染等诸多行业通用计算框架接入,提供高性能任务调度引擎,高性能异 ...
- Python 练习题:用索引取出LIST中的值
请用索引取出下面list的指定元素,分别为Apple,Python,Lisa # -*- coding: utf-8 -*- # 请用索引取出下面list的指定元素 L = [ ['Apple','G ...
- fancybit个人简介
程序员一枚 熟悉C C++ C# js lua等多种常见开发语言 熟悉Unity游戏开发 node.js pomelo和C# scut 网游后端框架 做过.net和php网站后端 二次元文化爱好者 有 ...
- 记第一次使用NET CORE 2.2 完成的DEMO部署在LINUX并且上线
.NET CORE 这么久了一直没有成功打通过,今天花了点儿时间做了一个小DEMO,首次完成并且部署上线.记录一下. DEMO中只是测试了一下从MSSQL中获取数据,并且显示在页面上,涉及到了数据库连 ...
- [個人紀錄] postgre dump出table 再用psql還原
--dump tablepg_dump --host #server --port 5432 --username #username --format plain --ignore-version ...
- Salesforce LWC学习(一)Salesforce DX配置
LWC: Create a Salesforce DX Project and Lightning Web Component:https://www.youtube.com/watch?v=p268 ...
- Redis之缓存雪崩、缓存穿透、缓存预热、缓存更新、缓存降级
目录 Redis之缓存雪崩.缓存穿透.缓存预热.缓存更新.缓存降级 1.缓存雪崩 2.缓存穿透 3.缓存预热 4.缓存更新 5.缓存降级 Redis之缓存雪崩.缓存穿透.缓存预热.缓存更新.缓存降级 ...
- vue-cli随机生成port源码
const portfinder = require('portfinder'): const port = await portfinder.getPortPromise(): 两行代码 端口搜索范 ...
- 结合 Vue.observable 写一个简易 Vuex
作为 Vue 全家桶的一员,Vuex 的重要性不言而喻,不管是用来管理状态,还是封装 Controler 都很好用 不过在一些体量较小的项目中,为了几个简单的状态或者处理函数而引入 Vuex,就像是高 ...
- Codeforces D. The Sum of the k-th Powers(拉格朗日插值)
题目描述: The Sum of the k-th Powers time limit per test 2 seconds memory limit per test 256 megabytes i ...