admin管理员组

文章数量:1648586

LFS使用记录

    • 常用流程
    • 可能遇到的bug

常用流程

记录大文件,通常为.bin 或者.pkl格式

git lfs track "*.bin"
git lfs track "*.pkl"

此时可以发现多了一个 .gitattributes 文件,记录了track的信息

也可以输入以下命令直接查看

git lfs track

在常规git add前,需要将lfs相关的信息commit

git add .gitattributes
git commit -m "add .gitattributes"

在此之后进行常规操作

git add .
git lfs ls-files ##查看lfs了哪些具体文件
git commit -m "commit"
git push

可能遇到的bug

报错信息
”This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.“
Git LFS 不是完全免费的,有容量限制。可以在repo的setting下archive里面查看,没开启的需要开启。

’fatal: the remote end hung up unexpectedly
Everything up-to-date‘

可能是梯子端口没配置好

本文标签: Gitlfs