table of contents
- bullseye 2.13.2-1+b5
- bullseye-backports 3.3.0-1~bpo11+1
- testing 3.3.0-1+b3
- unstable 3.3.0-1+b4
git-lfs-fetch - Download all Git LFS files for a given ref
git lfs fetch [options] [<remote> [<ref>...]]
Download Git LFS objects at the given refs from the specified remote. See DEFAULT REMOTE and [_default_refs] for what happens if you don’t specify.
This does not update the working copy.
-I <paths>, --include=<paths>
-X <paths>, --exclude=<paths>
INCLUDE AND EXCLUDE¶
You can configure Git LFS to only fetch objects to satisfy references in certain paths of the repo, and/or to exclude certain paths of the repo, to reduce the time you spend downloading things you do not use.
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. If lfs.fetchinclude is defined, Git LFS objects will only be fetched if their path matches one in that list, and if lfs.fetchexclude is 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).
Note that using the command-line options -I and -X override the respective configuration settings. Setting either option to an empty string clears the value.
This will only fetch objects referenced in paths in the textures folder, and files called foo* in the images folder
Only fetch JPG/PNG/TGA files, wherever they are in the repository
Don’t fetch any LFS objects referenced in the folder media/reallybigfiles, but fetch everything else
Only fetch LFS objects in the 'media' folder, but exclude those in one of its subfolders.
Without arguments, fetch downloads from the default remote. The default remote is the same as for git fetch, i.e. based on the remote branch you’re tracking first, or origin otherwise.
If no refs are given as arguments, the currently checked out ref is used. In addition, if enabled, recently changed refs and commits are also included. See [_recent_changes] for details.
If the --recent option is specified, or if the gitconfig option lfs.fetchrecentalways is true, then after the current ref (or those in the arguments) is fetched, we also search for 'recent' changes to fetch objects for, so that it’s more convenient to checkout or diff those commits without incurring further downloads.
What changes are considered 'recent' is based on a number of gitconfig options:
git lfs fetch
git lfs fetch --recent
git lfs fetch upstream
git lfs fetch --all origin main develop
git lfs fetch origin mybranch
git lfs fetch origin main mybranch e445b45c1c9c6282614f201b62778e4c0688b5c8
git-lfs-checkout(1), git-lfs-pull(1), git-lfs-prune(1), gitconfig(5).
Part of the git-lfs(1) suite.