写点什么

github 上传大文件 (超过 100M),java 基础编程题网站

作者:MySQL神话
  • 2021 年 11 月 27 日
  • 本文字数:1081 字

    阅读完需:约 4 分钟

3.解决步骤

3.1 安装 git-lfs

  • Windows


  1. 下载安装 windows installer

  2. 运行 windows installer

  3. 在命令行执行 git lfs install




  • Linux


curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash


sudo apt-get install git-lfs


git lfs install


  • Mac


  1. 安装 HomeBrew /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

  2. brew install git-lfs

  3. git lfs install



3.2 使用

  1. 执行 git lfs install 开启 lfs 功能



  1. 使用 git lfs track 命令进行大文件追踪 例如 git lfs track “*.pdf” 追踪所有后缀为 pdf 的文件(修改仓库路径下的 .gitattributes 文件:)



  1. 使用 git lfs track 查看现有的文件追踪模式



  1. 之后正常 add commit push 即可



  1. 提交后运行 git lfs ls-files 可以显示当前跟踪的文件列表

  2. clone 时 使用’git clone’ 或 git lfs clone 均可


备注:


github的LFS指南



4. 中途碰到的问题

4.1 问题

$ git push origin read-code-v0.11.0.3-rc0


Remote "origin" does not support the LFS locking API. Consider disabling it with:


$ git config lfs.https://github.com/bigData-lab/kafka.git/info/lfs.locksverify false


Post "https://github.com/bigData-lab/kafka.git/info/lfs/locks/verify": dial tcp 192.30.255.113:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.


《一线大厂 Java 面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》

【docs.qq.com/doc/DSmxTbFJ1cmN1R2dB】 完整内容开源分享


解决


//错误信息中已经提供解决思路。将配置中参数设置为 false


git config lfs.https://github.com/bigData-lab/kafka.git/info/lfs.locksverify false

4.2 问题

batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.


解决


目前 Git LFS 的总存储量为 1G 左右,超过需要付费。具体见 github 右上角个人头像-Settings->Billing & plans


最后

现在正是金三银四的春招高潮,前阵子小编一直在搭建自己的网站,并整理了全套的**【一线互联网大厂 Java 核心面试题库+解析】:包括 Java 基础、异常、集合、并发编程、JVM、Spring 全家桶、MyBatis、Redis、数据库、中间件 MQ、Dubbo、Linux、Tomcat、ZooKeeper、Netty 等等**



本文已被CODING开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频+实战项目源码】收录

用户头像

MySQL神话

关注

还未添加个人签名 2021.11.12 加入

还未添加个人简介

评论

发布
暂无评论
github上传大文件(超过100M),java基础编程题网站