Debian Codegraph @

docs/man/git-lfs-pull.adoc

raw
1 = git-lfs-pull(1)
2
3 == NAME
4
5 git-lfs-pull - Download all Git LFS files for current ref & checkout
6
7 == SYNOPSIS
8
9 [source,role=synopsis,subs="verbatim,quotes"]
10 ----
11 *git lfs pull* [_options_] [_<remote>_]
12 ----
13
14 == DESCRIPTION
15
16 Download Git LFS objects for the currently checked out ref, and update
17 the working copy with the downloaded content if required.
18
19 This is generally equivalent to running the following two commands:
20
21 ....
22 $ git lfs fetch [options] [<remote>]
23 $ git lfs checkout
24 ....
25
26 If the installed Git version is at least 2.42.0, in a non-bare repository
27 this command will by default fetch and check out Git LFS objects for files
28 only if they are present in the Git index and if they match a Git LFS
29 filter attribute from a `.gitattributes` file that is present in either
30 the index or the current working tree (or, as is always the case, if
31 they match a Git LFS filter attribute in a local `gitattributes` file
32 such as `$GIT_DIR/info/attributes`). These constraints do not apply
33 with prior versions of Git.
34
35 In a repository with a partial clone or sparse checkout, it is therefore
36 advisable to check out all `.gitattributes` files from `HEAD` before
37 using this command, if Git v2.42.0 or later is installed. Alternatively,
38 the `GIT_ATTR_SOURCE` environment variable may be set to `HEAD`, which
39 will cause Git to only read attributes from `.gitattributes` files in
40 `HEAD` and ignore those in the index or working tree.
41
42 In a bare repository, if the installed Git version is at least 2.42.0,
43 this command will by default fetch Git LFS objects for files only if
44 they are present in the Git index and if they match a Git LFS filter
45 attribute from a local `gitattributes` file such as
46 `$GIT_DIR/info/attributes`. Any `.gitattributes` files in `HEAD` will
47 be ignored, unless the `GIT_ATTR_SOURCE` environment variable is set
48 to `HEAD`, and any `.gitattributes` files in the index or current
49 working tree will always be ignored. These constraints do not apply
50 with prior versions of Git.
51
52 == OPTIONS
53
54 `-I <paths>`::
55 `--include=<paths>`::
56 Specify lfs.fetchinclude just for this invocation; see <<_include_and_exclude>>
57 `-X <paths>`::
58 `--exclude=<paths>`::
59 Specify lfs.fetchexclude just for this invocation; see <<_include_and_exclude>>
60
61 == INCLUDE AND EXCLUDE
62
63 You can configure Git LFS to only fetch objects to satisfy references in
64 certain paths of the repo, and/or to exclude certain paths of the repo,
65 to reduce the time you spend downloading things you do not use.
66
67 In your Git configuration or in a `.lfsconfig` file, you may set either
68 or both of `lfs.fetchinclude` and `lfs.fetchexclude` to comma-separated
69 lists of paths. If `lfs.fetchinclude` is defined, Git LFS objects will
70 only be fetched if their path matches one in that list, and if
71 `lfs.fetchexclude` is defined, Git LFS objects will only be fetched if
72 their path does not match one in that list. Paths are matched using
73 wildcard matching as per gitignore(5).
74
75 Note that using the command-line options `-I` and `-X` override the
76 respective configuration settings. Setting either option to an empty
77 string clears the value.
78
79 == DEFAULT REMOTE
80
81 Without arguments, pull downloads from the default remote. The default
82 remote is the same as for `git pull`, i.e. based on the remote branch
83 you're tracking first, or origin otherwise.
84
85 == SEE ALSO
86
87 git-lfs-fetch(1), git-lfs-checkout(1), gitattributes(5), gitignore(5).
88
89 Part of the git-lfs(1) suite.