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 仓库管 ...
随机推荐
- 剑指offer46:圆圈中最后剩下的数字(链表,递归)
1 题目描述 每年六一儿童节,牛客都会准备一些小礼物去看望孤儿院的小朋友,今年亦是如此.HF作为牛客的资深元老,自然也准备了一些小游戏.其中,有个游戏是这样的:首先,让小朋友们围成一个大圈.然后,他随 ...
- 【数据结构】P1996 约瑟夫问题
[题目链接] https://www.luogu.org/problem/P1996 题目描述 n个人(n<=100)围成一圈,从第一个人开始报数,数到m的人出列,再由下一个人重新从1开始报数, ...
- HeidiSQL 导入Excel数据
一 前言 原文出处:http://blog.csdn.net/qq_27727681/article/details/53944744 二 效果演示: 2000多条数据,顺利导入成功. 三 实现方法 ...
- 利用Mathpix Snipping Tool轻松在markdown/LaTeX中输入电子书和论文的数学公式
最近写图形学博客写累了,公式太多了,一个个输入实在太累,所以从数学建模队友那里吃了一个安利. 官网下载 下载安装后,直接新建一个截图,就可以转成LaTeX数学公式了.效果如下: 爽的一批啊!!! 另外 ...
- C#学习基础资料记录---字典(Dictionary),时间表示方法(DateTime.Now),文件操作
1.字典 https://www.cnblogs.com/gengaixue/p/4002244.html 2.时间的表示方法 DateTime.Now的多种用法 https://www.cnblog ...
- mbedtls 入门
mbedtls 入门 https://segmentfault.com/a/1190000012007117 ARM mbedtls使开发人员可以非常轻松地在嵌入式产品中加入加密和SSL/TLS功能. ...
- luogu1156垃圾陷阱题解--背包DP
题目链接 https://www.luogu.org/problemnew/show/P1156 方法1 分析 将已经爬的高度看作背包容积,最大剩余血量看作价值,\(f[i][j]\)表示吃完第\(i ...
- 最简单的一个win32程序
#include <windows.h> HINSTANCE g_hInst = NULL; //2 窗口处理函数 LRESULT CALLBACK WndProc( HWND hWnd, ...
- poi的基本导入
一.获取列的值 private String getCell(Cell cell){ if(null == cell){ return ""; } try{ cell.setCel ...
- Java BIO、NIO、AIO 基础,应用场景
Java对BIO.NIO.AIO的支持: Java BIO : 同步并阻塞,服务器实现模式为一个连接一个线程,即客户端有连接请求时服务器端就需要启动一个线程进行处理,如果这个连接不做任何事情会造成不必 ...