Git LFS¶
Git LFS (Large File Storage) extends Git to track large files without storing
them in the repository history. Git LFS is not preinstalled on the cluster,
but its binary can be downloaded and added to the PATH, after which the
git lfs commands become available in any repository.
What this guide covers¶
- Get the Git LFS archive
- Extract the archive
- Add the
git-lfsexecutable to thePATH - Verify the installation
Get the Git LFS archive¶
Git LFS is distributed as a tarball from the
Git LFS releases page. Pick
the git-lfs-linux-amd64-<VERSION>.tar.gz asset for the desired version, and
download it on the cluster with wget:
Extract the archive¶
Extract the tarball with tar:
Note
-x extracts files, -z decompresses the gzip archive, and -f
specifies the archive file.
The command creates a git-lfs-linux-amd64-<VERSION>/ directory containing
the git-lfs executable.
Add git-lfs to the PATH¶
Add the directory containing the git-lfs executable to the PATH:
Append the same line to ~/.bashrc to keep the setting across sessions:
Verify the installation¶
A printed version number confirms Git LFS is installed and reachable on the
PATH.
Key concepts¶
- Git LFS
- Git extension for versioning large files. LFS replaces large files in the repository history with text pointers, while storing the contents on a remote LFS server.