2015-05-29 15:28:10 +00:00
|
|
|
git-lfs-fetch(1) -- Download all Git LFS files for a given ref
|
|
|
|
==============================================================
|
|
|
|
|
|
|
|
## SYNOPSIS
|
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
`git lfs fetch` [options] [<remote> [<ref>...]]
|
2015-05-29 15:28:10 +00:00
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
2015-07-29 15:34:15 +00:00
|
|
|
Download any Git LFS objects for the given refs. If no refs are given,
|
2015-05-29 15:28:10 +00:00
|
|
|
the currently checked out ref will be used.
|
|
|
|
|
2015-07-23 16:53:58 +00:00
|
|
|
This does not update the working copy.
|
2015-05-29 15:28:10 +00:00
|
|
|
|
2015-08-07 17:18:39 +00:00
|
|
|
## OPTIONS
|
|
|
|
|
|
|
|
* `-I` <paths> `--include=`<paths>:
|
|
|
|
Specify lfs.fetchinclude just for this invocation; see [INCLUSION & EXCLUSION]
|
|
|
|
|
|
|
|
* `-X` <paths> `--exclude=`<paths>:
|
|
|
|
Specify lfs.fetchexclude just for this invocation; see [INCLUSION & EXCLUSION]
|
|
|
|
|
|
|
|
## INCLUSION & EXCLUSION
|
2015-08-06 13:56:57 +00:00
|
|
|
|
|
|
|
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 gitconfig, set lfs.fetchinclude and lfs.fetchexclude to comma-separated lists
|
|
|
|
of paths to include/exclude in the fetch (wildcard matching as per gitignore).
|
|
|
|
Only paths which are matched by fetchinclude and not matched by fetchexclude
|
|
|
|
will have objects fetched for them.
|
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
## DEFAULT REMOTE & REF
|
|
|
|
|
|
|
|
Without arguments, fetch downloads the current ref 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.
|
|
|
|
|
2015-05-29 15:28:10 +00:00
|
|
|
## EXAMPLES
|
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
* Fetch the LFS objects for the current ref from default remote
|
2015-05-29 15:28:10 +00:00
|
|
|
|
|
|
|
`git lfs fetch`
|
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
* Fetch the LFS objects for the current ref from a secondary remote 'upstream'
|
|
|
|
|
|
|
|
`git lfs fetch upstream`
|
|
|
|
|
|
|
|
* Fetch the LFS objects for a branch from origin
|
2015-05-29 15:28:10 +00:00
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
`git lfs fetch origin mybranch`
|
2015-05-29 15:28:10 +00:00
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
* Fetch the LFS objects for 2 branches and a commit from origin
|
2015-05-29 15:28:10 +00:00
|
|
|
|
2015-08-13 16:22:29 +00:00
|
|
|
`git lfs fetch origin master mybranch e445b45c1c9c6282614f201b62778e4c0688b5c8`
|
2015-05-29 15:28:10 +00:00
|
|
|
|
2015-07-23 16:53:58 +00:00
|
|
|
## SEE ALSO
|
|
|
|
|
|
|
|
git-lfs-checkout(1), git-lfs-pull(1).
|
|
|
|
|
2015-05-29 15:28:10 +00:00
|
|
|
Part of the git-lfs(1) suite.
|
|
|
|
|