github 上传大文件 (超过 100M),java 基础编程题网站
3.解决步骤
3.1 安装 git-lfs
Windows
下载安装 windows installer
运行 windows installer
在命令行执行 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
安装 HomeBrew /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
brew install git-lfs
git lfs install
3.2 使用
执行 git lfs install 开启 lfs 功能

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

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

之后正常 add commit push 即可

提交后运行 git lfs ls-files 可以显示当前跟踪的文件列表
clone 时 使用’git clone’ 或 git lfs clone 均可
备注:
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 等等**

评论