跳转至

Git LFS使用

Git LFS是什么

Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

安装 git-lfs

注意: 此处使用macOS系统

Bash
brew install git-lfs

初始化 git-lfs

Bash
git lfs install

配置仓库 LFS 追踪的文件(类型)

注意: 需要进入特定的git仓库中进行下面的操作

追踪特定类型的文件

Bash
git lfs track "big-record.log"

追踪特定的文件类型

Bash
git lfs track "*.jpg"

参考