1GIT-LFS-CHECKOUT(1)                                        GIT-LFS-CHECKOUT(1)
2
3
4

NAME

6       git-lfs-checkout - Update working copy with file content if available
7

SYNOPSIS

9       git lfs checkout [<glob-pattern>...]
10       git lfs checkout --to <file> {--base|--ours|--theirs}
11       <conflict-obj-path>
12

DESCRIPTION

14       Try to ensure that the working copy contains file content for Git LFS
15       objects for the current ref, if the object data is available. Does not
16       download any content; see git-lfs-fetch(1) for that.
17
18       Checkout scans the current ref for all LFS objects that would be
19       required, then where a file is either missing in the working copy, or
20       contains placeholder pointer content with the same SHA, the real file
21       content is written, provided we have it in the local store. Modified
22       files are never overwritten.
23
24       One or more s may be provided as arguments to restrict the set of files
25       that are updated. Glob patterns are matched as per the format described
26       in gitignore(5).
27
28       When used with --to and the working tree is in a conflicted state due
29       to a merge, this option checks out one of the three stages a
30       conflicting Git LFS object into a separate file (which can be outside
31       of the work tree). This can make using diff tools to inspect and
32       resolve merges easier. A single Git LFS object’s file path must be
33       provided in <conflict-obj-path>.
34

OPTIONS

36       --base
37           Check out the merge base of the specified file.
38
39       --ours
40           Check out our side (that of the current branch) of the conflict for
41           the specified file.
42
43       --theirs
44             Check out their side (that of the other branch) of the conflict
45           for the specified file.
46
47       --to <path>
48           If the working tree is in a conflicted state, check out the portion
49           of the conflict specified by --base, --ours, or --theirs to the
50           given path.
51

EXAMPLES

53       •   Checkout all files that are missing or placeholders:
54
55           $ git lfs checkout
56
57       •   Checkout a specific couple of files:
58
59           $ git lfs checkout path/to/file1.png path/to.file2.png
60
61       •   Checkout a path with a merge conflict into separate files:
62
63           # Attempt merge with a branch that has a merge conflict
64           $ git merge conflicting-branch
65           CONFLICT (content): Merge conflict in path/to/conflicting/file.dat
66
67           # Checkout versions of the conflicting file into temp files
68           $ git lfs checkout ours.dat --ours path/to/conflicting/file.dat
69           $ git lfs checkout theirs.dat --theirs path/to/conflicting/file.dat
70
71           # Compare conflicting versions in ours.dat and theirs.dat,
72           # then resolve conflict (e.g., by choosing one version over
73           # the other, or creating a new version)
74
75           # Cleanup and continue with merge
76           $ rm ours.dat theirs.dat
77           $ git add path/to/conflicting/file.dat
78           $ git merge --continue
79

SEE ALSO

81       git-lfs-fetch(1), git-lfs-pull(1), gitignore(5).
82
83       Part of the git-lfs(1) suite.
84
85
86
87                                                           GIT-LFS-CHECKOUT(1)
Impressum