GIT-LFS-PULL(1)
π GIT-LFS-PULL(1) β the manual page, bestie edition π
okay so real quick: this is git-lfs-pull, straight out of the git-lfs(1) suite. she's the one who grabs ALL your Git LFS files for the ref you're on, and yes she's iconic for it. let's get into it β¨
β¨ NAME β¨
git-lfs-pull β downloads every single Git LFS file for the current ref & checks it out. that's the whole vibe. no cap. π«Ά
π¦ SYNOPSIS π¦
git lfs pull [options] [<remote>]
πΈ DESCRIPTION πΈ
so what she does is: download the Git LFS objects for the ref you currently have checked out, and then update your working copy with the downloaded content if required. lowkey that's it, but she does it flawlessly. π
she's generally equivalent to running these two commands, like, back to back:
$ git lfs fetch [options] [<remote>]
$ git lfs checkout
so if you've ever run those two in a row and felt powerful β yeah, that's her. main character energy. π
okay now here's the part where you have to actually pay attention, bestie, because this is where behaviour depends on your Git version:
If the installed Git version is at least 2.42.0, then in a non-bare repository this command will, by default, fetch and check out Git LFS objects for files only if:
- they are present in the Git index, and
- they match a Git LFS filter attribute from a
.gitattributesfile that is present in either the index or the current working tree
(or β and this one's always true, no version check, no drama β if they match a Git LFS filter attribute in a local gitattributes file such as $GIT_DIR/info/attributes).
π«Ά these constraints do not apply with prior versions of Git. older Git just does the thing. slay for her honestly.
In a repository with a partial clone or sparse checkout, it is therefore advisable to check out all .gitattributes files from HEAD before using this command, if Git v2.42.0 or later is installed. like, do it first, it's giving self-care. π§
Alternatively, the GIT_ATTR_SOURCE environment variable may be set to HEAD, which will cause Git to only read attributes from .gitattributes files in HEAD and ignore those in the index or working tree. pick your fighter. π
In a bare repository, if the installed Git version is at least 2.42.0, this command will by default fetch Git LFS objects for files only if:
- they are present in the Git index, and
- they match a Git LFS filter attribute from a local gitattributes file such as
$GIT_DIR/info/attributes
and the rules for bare repos get even stricter, so buckle up buttercup:
- any
.gitattributesfiles inHEADwill be ignored, unless theGIT_ATTR_SOURCEenvironment variable is set toHEAD - any
.gitattributesfiles in the index or current working tree will always be ignored
π again: these constraints do not apply with prior versions of Git. older Git said "rules? never met her."
π OPTIONS π
-I<paths>,--include=<paths>β specifylfs.fetchincludejust for this one invocation; peep INCLUDE AND EXCLUDE below for the full tea π-X<paths>,--exclude=<paths>β specifylfs.fetchexcludejust for this one invocation; also see INCLUDE AND EXCLUDE π
π INCLUDE AND EXCLUDE π
you can configure Git LFS to only fetch objects that satisfy references in certain paths of the repo, and/or to exclude certain paths of the repo β which reduces the time you spend downloading stuff you literally do not use. it's giving efficiency. β‘
In your Git configuration or in a .lfsconfig file, you may set either or both of lfs.fetchinclude and lfs.fetchexclude to comma-separated lists of paths. here's the rules, bestie:
- if
lfs.fetchincludeis defined, Git LFS objects will only be fetched if their path matches one in that list - and if
lfs.fetchexcludeis defined, Git LFS objects will only be fetched if their path does not match one in that list
Paths are matched using wildcard matching as per gitignore(5). iykyk. π¦
β note that using the command-line options-Iand-Xoverride the respective configuration settings. and setting either option to an empty string clears the value. she said "no value, no problem." π
π DEFAULT REMOTE π
Without arguments, pull downloads from the default remote. The default remote is the same as for git pull, i.e. based on the remote branch you're tracking first, or origin otherwise. so she just knows where to go. main character instinct. β¨
π SEE ALSO π
git-lfs-fetch(1), git-lfs-checkout(1), gitattributes(5), gitignore(5).
Part of the git-lfs(1) suite. π«Ά
and that's the whole page, bestie!! ππ this one's GIT-LFS-PULL(1) from the git-lfs(1) squad β mwah, go download your files, you deserve them. ππ¦β¨
π¦ where this page comes from
- arch rolling: git-lfs 3.8.1-1 Β· MIT
- nixos 26.05: git-lfs 3.8.1
- nixpkgs unstable: git-lfs 3.8.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms