安装 git lfs
官网
https://git-lfs.github.com/
下载
https://github.com/github/git-lfs/releases/download/v1.4.1/git-lfs-windows-1.4.1.exe
环境变量
这里认为 git 和 git lfs 环境变量配好
这里使用的是 Git-1.9.2-preview20140411
使用
git lfs 相关指令,在 cmd 下使用如下命令查看
git lfs -h
下面列出上面命令输出的主要内容,省略了无关紧要的内容,具体的自己查看
git lfs <command> [<args>]
High level commands
--------------------
* git lfs env:
Display the Git LFS environment.
* git lfs checkout:
Populate working copy with real content from Git LFS files
* git lfs clone:
Efficiently clone a Git LFS-enabled repository
* git lfs fetch:
Download git LFS files from a remote
* git lfs fsck:
Check GIT LFS files for consistency.
* git lfs install:
Install Git LFS configuration.
* git lfs logs:
Show errors from the git-lfs command.
* git lfs ls-files:
Show information about Git LFS files in the index and working tree.
* git lfs pull:
Fetch LFS changes from the remote & checkout any required working tree files
* git lfs push:
Push queued large files to the Git LFS endpoint.
* git lfs status:
Show the status of Git LFS files in the working tree.
* git lfs track:
View or add Git LFS paths to Git attributes.
* git lfs untrack:
Remove Git LFS paths from Git Attributes.
* git lfs update:
Update Git hooks for the current Git repository.
* git lfs version:
Report the version number.
Low level commands
-------------------
* git lfs clean:
Git clean filter that converts large files to pointers.
* git lfs pointer:
Build and compare pointers.
* git lfs pre-push:
Git pre-push hook implementation.
* git lfs smudge:
Git smudge filter that converts pointer in blobs to the actual content.
如何使用
只要是对启用 lfs 存储的 git 项目,对 lfs 相关文件的操作后使用 git lfs 指令。
如
git lfs clone https://github.com/xx/xxxx.git