git lfs setpu(4)
reference:
https://packagecloud.io/github/git-lfs/install
https://zzz.buzz/zh/2016/04/19/the-guide-to-git-lfs/
root@hardware-dev:/home/anosi/work/git/git-lfs/git-lfs# curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
Detected operating system as Ubuntu/bionic.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/github_git-lfs.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.
The repository is setup! You can now install packages.
root@hardware-dev:/home/anosi/work/git/git-lfs/git-lfs# apt install git-lfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libreadline7:i386
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
git-lfs
0 upgraded, 1 newly installed, 0 to remove and 378 not upgraded.
Need to get 5,730 kB of archives.
After this operation, 13.9 MB of additional disk space will be used.
Get:1 https://packagecloud.io/github/git-lfs/ubuntu bionic/main amd64 git-lfs amd64 2.7.2 [5,730 kB]
Fetched 5,730 kB in 3s (1,729 kB/s)
Selecting previously unselected package git-lfs.
(Reading database ... 367353 files and directories currently installed.)
Preparing to unpack .../git-lfs_2.7.2_amd64.deb ...
Unpacking git-lfs (2.7.2) ...
Setting up git-lfs (2.7.2) ...
Git LFS initialized.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
root@hardware-dev:/home/anosi/work/git/tmp# git svn clone http://192.168.1.203/svn/software/iotx-am335x
root@hardware-dev:/home/anosi/work/git/tmp# cd iotx-am335x
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git remote add origin https://github.com/13701761349/test_mc183.git
git lfs init
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git lfs init
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git lfs track "*.tar.gz"
Tracking "*.tar.gz"
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git push -u origin master
Username for 'https://github.com': 13701761349
Password for 'https://13701761349@github.com':
Username for 'https://github.com': 13701761349
Password for 'https://13701761349@github.com':
Username for 'https://github.com': 13701761349
Password for 'https://13701761349@github.com':
Counting objects: 157335, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (107479/107479), done.
Writing objects: 100% (157335/157335), 815.04 MiB | 908.00 KiB/s, done.
Total 157335 (delta 43582), reused 157335 (delta 43582)
remote: Resolving deltas: 100% (43582/43582), done.
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 8e0f9c0b91a23ff9d5f7920454c1bc6a
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File TI-PROCESSOR-SDK-LINUX-AM335X-EVM-05.00.00.15/trunk/armbian-org-tar-rootfs/rootfs.tar.gz is 232.34 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/13701761349/test_mc183.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/13701761349/test_mc183.git'
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch rootfs.tar.gz'
Cannot rewrite branches: You have unstaged changes.
root@hardware-dev:/home/anosi/work/git/tmp/iotx-am335x# git push -u origin master
GitHub对文件的大小有限制,问题在于,当移除了相关的文件之后,问题依然存在。
解决方法:
除了移除相关的文件,还要修改git的历史记录,移除相应的commit结点。
最简单的方法是使用以下命令:
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch YOUR-FILE'
此命令会将指定的文件从push过程中过滤掉。
请谨慎使用此命令,强烈建议在使用前先备份,以防止误操作。
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch rootfs.tar.gz'
git lfs setpu(4)的更多相关文章
- 如何使用 Git LFS 提交大文件?
参考资料: An open source Git extension for versioning large files Git LFS的使用 如何使用 Git LFS 提交大文件? Git LFS ...
- 未安装git lfs导致git下载不完整,没有错误提示
git clone命令没有报错. --recursive选项也加上了. cmake命令没有报错 make命令出错. 最后发现是因为没有安装git lfs,导致大文件下载不完整.最坑的是下载的时候也没有 ...
- GIT LFS 使用笔记
一.背景 由于git上传文件大小受限,所以我们需要使用GIT LFS对大小超过一定上限的大文件进行处理. 二.安装 linux上安装参见 https://askubuntu.com/questions ...
- git lfs
https://git-lfs.github.com/ 1.从这个网址下载git-lfs-windows-amd64-1.1.0.exe,运行这个安装包 2.然后打开git bash 输入git lf ...
- git lfs指令解决git status显示lib文件被修改,但是没有修改的问题。此时,git checkout没有用。
$ git lfs migrate import --everything --include='*.LIB'https://github.com/git-lfs/git-lfs/issues/283 ...
- Git LFS的使用
Git LFS的使用 Git LFS 是 Github 开发的一个 Git 的扩展,用于实现 Git 对大文件的支持 使用目的 在游戏开发过程中,设计资源占用了很大一部分空间. 像png,psd等文件 ...
- 更好的在 Git 项目中保存大文件(Git LFS 的使用)
珠玉在前, 大家可以参考 Git LFS的使用 - 简书 为什么要用 Git LFS 原有的 Git 是文本层面的版本控制, 为代码这种小文件设计的, 保存大文件会导致 repo 非常臃肿, push ...
- apline无法向gitlab上传git lfs问题
1 背景 在k8s中基于alpine做底层系统的容器进行git lfs push操作时,发现报错无法上传成功 Fatal error: Server error: http://git.ops.xxx ...
- Nexus OSS 3 搭建并配置使用 Docker & Git LFS 仓库
转载自:https://cloud.tencent.com/developer/article/1010590 1.Nexus OSS 3 介绍 我们知道 Nexus 是一个强大的 Maven 仓库管 ...
随机推荐
- 剑指offer40:一个整型数组里除了两个数字之外,其他的数字都出现了两次。请写程序找出这两个只出现一次的数字
1 题目描述 一个整型数组里除了两个数字之外,其他的数字都出现了两次.请写程序找出这两个只出现一次的数字. 2 思路和方法 (1)异或:除了有两个数字只出现了一次,其他数字都出现了两次.异或运算中,任 ...
- 使用 pdb 进行调试
使用 pdb 进行调试 pdb 是 python 自带的一个包,为 python 程序提供了一种交互的源代码调试功能,主要特性包括设置断点.单步调试.进入函数调试.查看当前代码.查看栈片段.动态改变变 ...
- JS闭包的简单理解。优缺点以及垃圾回收机制
闭包是什么? ·了解闭包首先了解js的‘链式作用域’结构,对象可以一级一级的向上查找父对象的变量,所以父对象的变量对子对象可见,反之不成立:所以都可以访问全局变量 ·为了解决函数外部无法访问函数内局部 ...
- 一个用JavaScript生成思维导图(mindmap)的github repo
github 地址:https://github.com/dundalek/markmap 作者的readme写得很简单. 今天有同事问作者提供的例子到底怎么跑.这里我就写一个更详细的步骤出来. 首先 ...
- ssh: Bad configuration option: usedns
某天突然听到同事说服务器上git用不了了,上去一看,确实用不了了,git pull报出了如下错误: $ git pull /etc/: Bad configuration option: usedns ...
- DICOM文件修改方法
/// <summary> /// 读取dicom文件 /// </summary> /// <param name="srcdirectory"&g ...
- 三、DQL语言
目录 一.基础查询 (一)语法 (二)特点 (三)示例 二.条件查询 (一)语法 (二)筛选条件的分类 三.排序查询 (一)语法 (二)特点 四.常见函数 (一)介绍 (二)分类 五.单行函数 (一) ...
- 轻量化模型之SqueezeNet
自 2012 年 AlexNet 以来,卷积神经网络在图像分类.目标检测.语义分割等领域获得广泛应用.随着性能要求越来越高,AlexNet 已经无法满足大家的需求,于是乎各路大牛纷纷提出性能更优越的 ...
- storm 的分组策略深入理解(-)
目录 storm的分组策略 根据实例来分析分组策略 common配置: Shuffle grouping shuffle grouping的实例代码 ShuffleGrouping 样例分析 Fiel ...
- HDU 4085 斯坦纳树+DP
https://cn.vjudge.net/problem/HDU-4085 给你n,m,k ,分别表示有n个点,m条边,每条边有一个权值,表示修复这条边需要的代价 从前k个点中任取一个使其和后k个点 ...