'\" t .\" Title: git-lfs-checkout .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.12 .\" Date: 2022-12-28 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "GIT\-LFS\-CHECKOUT" "1" "2022-12-28" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "NAME" git\-lfs\-checkout \- Update working copy with file content if available .SH "SYNOPSIS" .sp \f(CRgit lfs checkout\fP [...] .br \f(CRgit lfs checkout\fP \-\-to {\-\-base|\-\-ours|\-\-theirs} .SH "DESCRIPTION" .sp Try to ensure that the working copy contains file content for Git LFS objects for the current ref, if the object data is available. Does not download any content; see git\-lfs\-fetch(1) for that. .sp Checkout scans the current ref for all LFS objects that would be required, then where a file is either missing in the working copy, or contains placeholder pointer content with the same SHA, the real file content is written, provided we have it in the local store. Modified files are never overwritten. .sp One or more s may be provided as arguments to restrict the set of files that are updated. Glob patterns are matched as per the format described in gitignore(5). .sp When used with \f(CR\-\-to\fP and the working tree is in a conflicted state due to a merge, this option checks out one of the three stages a conflicting Git LFS object into a separate file (which can be outside of the work tree). This can make using diff tools to inspect and resolve merges easier. A single Git LFS object\(cqs file path must be provided in \f(CR\fP. .SH "OPTIONS" .sp \f(CR\-\-base\fP .RS 4 Check out the merge base of the specified file. .RE .sp \f(CR\-\-ours\fP .RS 4 Check out our side (that of the current branch) of the conflict for the specified file. .RE .sp \f(CR\-\-theirs\fP .RS 4 Check out their side (that of the other branch) of the conflict for the specified file. .RE .sp \f(CR\-\-to \fP .RS 4 If the working tree is in a conflicted state, check out the portion of the conflict specified by \f(CR\-\-base\fP, \f(CR\-\-ours\fP, or \f(CR\-\-theirs\fP to the given path. .RE .SH "EXAMPLES" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} Checkout all files that are missing or placeholders: .RE .sp .if n .RS 4 .nf .fam C $ git lfs checkout .fam .fi .if n .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} Checkout a specific couple of files: .RE .sp .if n .RS 4 .nf .fam C $ git lfs checkout path/to/file1.png path/to.file2.png .fam .fi .if n .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ . sp -1 . IP \(bu 2.3 .\} Checkout a path with a merge conflict into separate files: .RE .sp .if n .RS 4 .nf .fam C # Attempt merge with a branch that has a merge conflict $ git merge conflicting\-branch CONFLICT (content): Merge conflict in path/to/conflicting/file.dat # Checkout versions of the conflicting file into temp files $ git lfs checkout ours.dat \-\-ours path/to/conflicting/file.dat $ git lfs checkout theirs.dat \-\-theirs path/to/conflicting/file.dat # Compare conflicting versions in ours.dat and theirs.dat, # then resolve conflict (e.g., by choosing one version over # the other, or creating a new version) # Cleanup and continue with merge $ rm ours.dat theirs.dat $ git add path/to/conflicting/file.dat $ git merge \-\-continue .fam .fi .if n .RE .SH "SEE ALSO" .sp git\-lfs\-fetch(1), git\-lfs\-pull(1), gitignore(5). .sp Part of the git\-lfs(1) suite.