|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta http-equiv='content-type' content='text/html;charset=utf8'> |
|
<meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'> |
|
<title>git-lfs(1) - Work with large files in Git repositories</title> |
|
<style type='text/css' media='all'> |
|
|
|
body#manpage {margin:0} |
|
.mp {max-width:100ex;padding:0 9ex 1ex 4ex} |
|
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0} |
|
.mp h2 {margin:10px 0 0 0} |
|
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex} |
|
.mp h3 {margin:0 0 0 4ex} |
|
.mp dt {margin:0;clear:left} |
|
.mp dt.flush {float:left;width:8ex} |
|
.mp dd {margin:0 0 0 9ex} |
|
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left} |
|
.mp pre {margin-bottom:20px} |
|
.mp pre+h2,.mp pre+h3 {margin-top:22px} |
|
.mp h2+pre,.mp h3+pre {margin-top:5px} |
|
.mp img {display:block;margin:auto} |
|
.mp h1.man-title {display:none} |
|
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143} |
|
.mp h2 {font-size:16px;line-height:1.25} |
|
.mp h1 {font-size:20px;line-height:2} |
|
.mp {text-align:justify;background:#fff} |
|
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211} |
|
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201} |
|
.mp u {text-decoration:underline} |
|
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211} |
|
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none} |
|
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff} |
|
.mp b.man-ref {font-weight:normal;color:#434241} |
|
.mp pre {padding:0 4ex} |
|
.mp pre code {font-weight:normal;color:#434241} |
|
.mp h2+pre,h3+pre {padding-left:0} |
|
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px} |
|
ol.man-decor {width:100%} |
|
ol.man-decor li.tl {text-align:left} |
|
ol.man-decor li.tc {text-align:center;letter-spacing:4px} |
|
ol.man-decor li.tr {text-align:right;float:right} |
|
</style> |
|
</head> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<body id='manpage'> |
|
<div class='mp' id='man'> |
|
|
|
<div class='man-navigation' style='display:none'> |
|
<a href="#NAME">NAME</a> |
|
<a href="#SYNOPSIS">SYNOPSIS</a> |
|
<a href="#DESCRIPTION">DESCRIPTION</a> |
|
<a href="#COMMANDS">COMMANDS</a> |
|
<a href="#EXAMPLES">EXAMPLES</a> |
|
</div> |
|
|
|
<ol class='man-decor man-head man head'> |
|
<li class='tl'>git-lfs(1)</li> |
|
<li class='tc'></li> |
|
<li class='tr'>git-lfs(1)</li> |
|
</ol> |
|
|
|
|
|
|
|
<h2 id="NAME">NAME</h2> |
|
<p class="man-name"> |
|
<code>git-lfs</code> - <span class="man-whatis">Work with large files in Git repositories</span> |
|
</p> |
|
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
|
|
|
<p><code>git lfs</code> <var>command</var> [<var>args</var>]</p> |
|
|
|
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
|
|
|
<p>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> |
|
|
|
<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 <code>pre-push</code> 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.</p> |
|
|
|
<h2 id="COMMANDS">COMMANDS</h2> |
|
|
|
<p>Like Git, Git LFS commands are separated into high level ("porcelain") |
|
commands and low level ("plumbing") commands.</p> |
|
|
|
<h3 id="High-level-porcelain-commands">High level porcelain commands</h3> |
|
|
|
<dl> |
|
<dt><a class="man-ref" href="git-lfs-checkout.1.html">git-lfs-checkout<span class="s">(1)</span></a></dt> |
|
<dd> Populate working copy with real content from Git LFS files.</dd> |
|
<dt><a class="man-ref" href="git-lfs-dedup.1.html">git-lfs-dedup<span class="s">(1)</span></a></dt> |
|
<dd> De-duplicate Git LFS files.</dd> |
|
<dt><a class="man-ref" href="git-lfs-env.1.html">git-lfs-env<span class="s">(1)</span></a></dt> |
|
<dd> Display the Git LFS environment.</dd> |
|
<dt><a class="man-ref" href="git-lfs-ext.1.html">git-lfs-ext<span class="s">(1)</span></a></dt> |
|
<dd> Display Git LFS extension details.</dd> |
|
<dt><a class="man-ref" href="git-lfs-fetch.1.html">git-lfs-fetch<span class="s">(1)</span></a></dt> |
|
<dd> Download Git LFS files from a remote.</dd> |
|
<dt><a class="man-ref" href="git-lfs-fsck.1.html">git-lfs-fsck<span class="s">(1)</span></a></dt> |
|
<dd> Check Git LFS files for consistency.</dd> |
|
<dt><a class="man-ref" href="git-lfs-install.1.html">git-lfs-install<span class="s">(1)</span></a></dt> |
|
<dd> Install Git LFS configuration.</dd> |
|
<dt><a class="man-ref" href="git-lfs-lock.1.html">git-lfs-lock<span class="s">(1)</span></a></dt> |
|
<dd> Set a file as "locked" on the Git LFS server.</dd> |
|
<dt><a class="man-ref" href="git-lfs-locks.1.html">git-lfs-locks<span class="s">(1)</span></a></dt> |
|
<dd> List currently "locked" files from the Git LFS server.</dd> |
|
<dt><a class="man-ref" href="git-lfs-logs.1.html">git-lfs-logs<span class="s">(1)</span></a></dt> |
|
<dd> Show errors from the Git LFS command.</dd> |
|
<dt><a class="man-ref" href="git-lfs-ls-files.1.html">git-lfs-ls-files<span class="s">(1)</span></a></dt> |
|
<dd> Show information about Git LFS files in the index and working tree.</dd> |
|
<dt><a class="man-ref" href="git-lfs-migrate.1.html">git-lfs-migrate<span class="s">(1)</span></a></dt> |
|
<dd> Migrate history to or from Git LFS</dd> |
|
<dt><a class="man-ref" href="git-lfs-prune.1.html">git-lfs-prune<span class="s">(1)</span></a></dt> |
|
<dd> Delete old Git LFS files from local storage</dd> |
|
<dt><a class="man-ref" href="git-lfs-pull.1.html">git-lfs-pull<span class="s">(1)</span></a></dt> |
|
<dd> Fetch Git LFS changes from the remote & checkout any required working tree |
|
files.</dd> |
|
<dt><a class="man-ref" href="git-lfs-push.1.html">git-lfs-push<span class="s">(1)</span></a></dt> |
|
<dd> Push queued large files to the Git LFS endpoint.</dd> |
|
<dt><a class="man-ref" href="git-lfs-status.1.html">git-lfs-status<span class="s">(1)</span></a></dt> |
|
<dd> Show the status of Git LFS files in the working tree.</dd> |
|
<dt><a class="man-ref" href="git-lfs-track.1.html">git-lfs-track<span class="s">(1)</span></a></dt> |
|
<dd> View or add Git LFS paths to Git attributes.</dd> |
|
<dt><a class="man-ref" href="git-lfs-uninstall.1.html">git-lfs-uninstall<span class="s">(1)</span></a></dt> |
|
<dd> Uninstall Git LFS by removing hooks and smudge/clean filter configuration.</dd> |
|
<dt><a class="man-ref" href="git-lfs-unlock.1.html">git-lfs-unlock<span class="s">(1)</span></a></dt> |
|
<dd> Remove "locked" setting for a file on the Git LFS server.</dd> |
|
<dt><a class="man-ref" href="git-lfs-untrack.1.html">git-lfs-untrack<span class="s">(1)</span></a></dt> |
|
<dd> Remove Git LFS paths from Git Attributes.</dd> |
|
<dt><a class="man-ref" href="git-lfs-update.1.html">git-lfs-update<span class="s">(1)</span></a></dt> |
|
<dd> Update Git hooks for the current Git repository.</dd> |
|
<dt><span class="man-ref">git-lfs-version<span class="s">(1)</span></span></dt> |
|
<dd> Report the version number.</dd> |
|
</dl> |
|
|
|
<h3 id="Low-level-plumbing-commands">Low level plumbing commands</h3> |
|
|
|
<dl> |
|
<dt><a class="man-ref" href="git-lfs-clean.1.html">git-lfs-clean<span class="s">(1)</span></a></dt> |
|
<dd> Git clean filter that converts large files to pointers.</dd> |
|
<dt><a class="man-ref" href="git-lfs-filter-process.1.html">git-lfs-filter-process<span class="s">(1)</span></a></dt> |
|
<dd> Git process filter that converts between large files and pointers.</dd> |
|
<dt><a class="man-ref" href="git-lfs-merge-driver.1.html">git-lfs-merge-driver<span class="s">(1)</span></a></dt> |
|
<dd> Merge text-based LFS files</dd> |
|
<dt><a class="man-ref" href="git-lfs-pointer.1.html">git-lfs-pointer<span class="s">(1)</span></a></dt> |
|
<dd> Build and compare pointers.</dd> |
|
<dt><a class="man-ref" href="git-lfs-post-checkout.1.html">git-lfs-post-checkout<span class="s">(1)</span></a></dt> |
|
<dd> Git post-checkout hook implementation.</dd> |
|
<dt><a class="man-ref" href="git-lfs-post-commit.1.html">git-lfs-post-commit<span class="s">(1)</span></a></dt> |
|
<dd> Git post-commit hook implementation.</dd> |
|
<dt><a class="man-ref" href="git-lfs-post-merge.1.html">git-lfs-post-merge<span class="s">(1)</span></a></dt> |
|
<dd> Git post-merge hook implementation.</dd> |
|
<dt><a class="man-ref" href="git-lfs-pre-push.1.html">git-lfs-pre-push<span class="s">(1)</span></a></dt> |
|
<dd> Git pre-push hook implementation.</dd> |
|
<dt><a class="man-ref" href="git-lfs-smudge.1.html">git-lfs-smudge<span class="s">(1)</span></a></dt> |
|
<dd> Git smudge filter that converts pointer in blobs to the actual content.</dd> |
|
<dt><a class="man-ref" href="git-lfs-standalone-file.1.html">git-lfs-standalone-file<span class="s">(1)</span></a></dt> |
|
<dd> Git LFS standalone transfer adapter for file URLs (local paths).</dd> |
|
</dl> |
|
|
|
<h2 id="EXAMPLES">EXAMPLES</h2> |
|
|
|
<p>To get started with Git LFS, the following commands can be used.</p> |
|
|
|
<ol> |
|
<li> |
|
<p>Setup Git LFS on your system. You only have to do this once per |
|
repository per machine:</p> |
|
|
|
<pre><code>git lfs install |
|
</code></pre> |
|
</li> |
|
<li> |
|
<p>Choose the type of files you want to track, for examples all <code>ISO</code> |
|
images, with <a class="man-ref" href="git-lfs-track.1.html">git-lfs-track<span class="s">(1)</span></a>:</p> |
|
|
|
<pre><code>git lfs track "*.iso" |
|
</code></pre> |
|
</li> |
|
<li> |
|
<p>The above stores this information in <a class="man-ref" href="https://git-scm.com/docs/gitattributes">gitattributes<span class="s">(5)</span></a> files, so |
|
that file needs to be added to the repository:</p> |
|
|
|
<pre><code>git add .gitattributes |
|
</code></pre> |
|
</li> |
|
<li> |
|
<p>Commit, push and work with the files normally:</p> |
|
|
|
<pre><code>git add file.iso |
|
git commit -m "Add disk image" |
|
git push |
|
</code></pre> |
|
</li> |
|
</ol> |
|
|
|
<ol class='man-decor man-foot man foot'> |
|
<li class='tl'></li> |
|
<li class='tc'>May 2022</li> |
|
<li class='tr'>git-lfs(1)</li> |
|
</ol> |
|
|
|
</div> |
|
</body> |
|
</html> |
|
|