|
.\" generated with Ronn-NG/v0.9.1 |
|
.\" http: |
|
.TH "GIT\-LFS" "1" "May 2022" "" |
|
.SH "NAME" |
|
\fBgit\-lfs\fR \- Work with large files in Git repositories |
|
.SH "SYNOPSIS" |
|
\fBgit lfs\fR \fIcommand\fR [\fIargs\fR] |
|
.SH "DESCRIPTION" |
|
Git LFS is a system for managing and versioning large files in association with a Git repository\. Instead of storing the large files within the Git repository as blobs, Git LFS stores special "pointer files" in the repository, while storing the actual file contents on a Git LFS server\. The contents of the large file are downloaded automatically when needed, for example when a Git branch containing the large file is checked out\. |
|
.P |
|
Git LFS works by using a "smudge" filter to look up the large file contents based on the pointer file, and a "clean" filter to create a new version of the pointer file when the large file\'s contents change\. It also uses a \fBpre\-push\fR hook to upload the large file contents to the Git LFS server whenever a commit containing a new large file version is about to be pushed to the corresponding Git server\. |
|
.SH "COMMANDS" |
|
Like Git, Git LFS commands are separated into high level ("porcelain") commands and low level ("plumbing") commands\. |
|
.SS "High level porcelain commands" |
|
.TP |
|
git\-lfs\-checkout(1) |
|
Populate working copy with real content from Git LFS files\. |
|
.TP |
|
git\-lfs\-dedup(1) |
|
De\-duplicate Git LFS files\. |
|
.TP |
|
git\-lfs\-env(1) |
|
Display the Git LFS environment\. |
|
.TP |
|
git\-lfs\-ext(1) |
|
Display Git LFS extension details\. |
|
.TP |
|
git\-lfs\-fetch(1) |
|
Download Git LFS files from a remote\. |
|
.TP |
|
git\-lfs\-fsck(1) |
|
Check Git LFS files for consistency\. |
|
.TP |
|
git\-lfs\-install(1) |
|
Install Git LFS configuration\. |
|
.TP |
|
git\-lfs\-lock(1) |
|
Set a file as "locked" on the Git LFS server\. |
|
.TP |
|
git\-lfs\-locks(1) |
|
List currently "locked" files from the Git LFS server\. |
|
.TP |
|
git\-lfs\-logs(1) |
|
Show errors from the Git LFS command\. |
|
.TP |
|
git\-lfs\-ls\-files(1) |
|
Show information about Git LFS files in the index and working tree\. |
|
.TP |
|
git\-lfs\-migrate(1) |
|
Migrate history to or from Git LFS |
|
.TP |
|
git\-lfs\-prune(1) |
|
Delete old Git LFS files from local storage |
|
.TP |
|
git\-lfs\-pull(1) |
|
Fetch Git LFS changes from the remote & checkout any required working tree files\. |
|
.TP |
|
git\-lfs\-push(1) |
|
Push queued large files to the Git LFS endpoint\. |
|
.TP |
|
git\-lfs\-status(1) |
|
Show the status of Git LFS files in the working tree\. |
|
.TP |
|
git\-lfs\-track(1) |
|
View or add Git LFS paths to Git attributes\. |
|
.TP |
|
git\-lfs\-uninstall(1) |
|
Uninstall Git LFS by removing hooks and smudge/clean filter configuration\. |
|
.TP |
|
git\-lfs\-unlock(1) |
|
Remove "locked" setting for a file on the Git LFS server\. |
|
.TP |
|
git\-lfs\-untrack(1) |
|
Remove Git LFS paths from Git Attributes\. |
|
.TP |
|
git\-lfs\-update(1) |
|
Update Git hooks for the current Git repository\. |
|
.TP |
|
git\-lfs\-version(1) |
|
Report the version number\. |
|
.SS "Low level plumbing commands" |
|
.TP |
|
git\-lfs\-clean(1) |
|
Git clean filter that converts large files to pointers\. |
|
.TP |
|
git\-lfs\-filter\-process(1) |
|
Git process filter that converts between large files and pointers\. |
|
.TP |
|
git\-lfs\-merge\-driver(1) |
|
Merge text\-based LFS files |
|
.TP |
|
git\-lfs\-pointer(1) |
|
Build and compare pointers\. |
|
.TP |
|
git\-lfs\-post\-checkout(1) |
|
Git post\-checkout hook implementation\. |
|
.TP |
|
git\-lfs\-post\-commit(1) |
|
Git post\-commit hook implementation\. |
|
.TP |
|
git\-lfs\-post\-merge(1) |
|
Git post\-merge hook implementation\. |
|
.TP |
|
git\-lfs\-pre\-push(1) |
|
Git pre\-push hook implementation\. |
|
.TP |
|
git\-lfs\-smudge(1) |
|
Git smudge filter that converts pointer in blobs to the actual content\. |
|
.TP |
|
git\-lfs\-standalone\-file(1) |
|
Git LFS standalone transfer adapter for file URLs (local paths)\. |
|
.SH "EXAMPLES" |
|
To get started with Git LFS, the following commands can be used\. |
|
.IP "1." 4 |
|
Setup Git LFS on your system\. You only have to do this once per repository per machine: |
|
.IP "" 4 |
|
.nf |
|
git lfs install |
|
.fi |
|
.IP "" 0 |
|
|
|
.IP "2." 4 |
|
Choose the type of files you want to track, for examples all \fBISO\fR images, with git\-lfs\-track(1): |
|
.IP "" 4 |
|
.nf |
|
git lfs track "*\.iso" |
|
.fi |
|
.IP "" 0 |
|
|
|
.IP "3." 4 |
|
The above stores this information in gitattributes(5) files, so that file needs to be added to the repository: |
|
.IP "" 4 |
|
.nf |
|
git add \.gitattributes |
|
.fi |
|
.IP "" 0 |
|
|
|
.IP "4." 4 |
|
Commit, push and work with the files normally: |
|
.IP "" 4 |
|
.nf |
|
git add file\.iso |
|
git commit \-m "Add disk image" |
|
git push |
|
.fi |
|
.IP "" 0 |
|
|
|
.IP "" 0 |
|
|
|
|