Fetch
wrgl fetch
Download objects and refs from another repository.
wrgl fetch [REPOSITORY [REFSPEC...]] [flags]
Fetch branches and/or tags (collectively, "refs") from another repository, along with the objects necessary to complete their histories. Remote-tracking branches are then updated.
If REPOSITORY
is not specified then "origin" is assumed. If REFSPEC
are not specified then they are read from remote.<repository>.fetch
config.
Flags
--all
Fetch all remotes.
-d, --depth
The maximum depth pass which commits will be fetched shallowly. Shallow commits only have the metadata but not the data itself. In other words, while you can still see the commit history, you cannot access its data. If depth is set to 0 then all missing commits will be fetched in full.
-f, --force
Force update local branch in certain conditions.
-h, --help
help for fetch
Inherited flags
--badger-log
set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")
--cpuprofile
write cpu profile to file
--heapprofile
write heap profile to file
--log-file
output logs to specified file
--log-verbosity
log verbosity. Higher value means more log
--no-progress
don't display progress bar
--wrgl-dir
parent directory of repo, default to current working directory.
Examples
# fetch the main branch from origin
wrgl fetch origin refs/heads/main:refs/remotes/origin/main
# fetch multiple branches with glob pattern
wrgl fetch origin refs/heads/*:refs/remotes/origin/*
# fetch from origin, reading refspec from remote.origin.fetch
wrgl fetch
# fetch and force update a single branch
wrgl fetch +refs/heads/main:refs/remotes/origin/main
# fetch and force all non-fast-forward updates
wrgl fetch my-repo --force
# fetch the first 2 commits in full, fetch the rest shallowly
wrgl fetch origin refs/heads/main:refs/remotes/origin/main --depth 2
How refspecs are interpreted
Each refspec has the form <remote ref>:<local ref>
. The remote ref in the refspec must match actual refs at the remote of course. If the remote ref in the refspec is a glob pattern then the local ref must also be a glob pattern (e.g. refs/heads/*:refs/remotes/origin/*
).
If the local ref exist and is an ancestor of the remote ref then the update is called "fast-forward". If the local ref exist but it is not an ancestor of the remote ref then the update is called "non-fast-forward". Non-fast-forward updates are denied by default, unless --force
flag is specified or if refpsec is prefixed with a +
(e.g. +refs/heads/main:refs/remotes/origin/main
).
wrgl fetch tables
Download missing tables from another repository
wrgl fetch tables { REMOTE SUM... | --missing } [flags]
Flags
-h, --help
help for tables
--missing
Fetch all missing tables that could be reached from a branch
Inherited flags
--badger-log
set Badger log level, valid options are "error", "warning", "debug", and "info" (defaults to "error")
--cpuprofile
write cpu profile to file
--heapprofile
write heap profile to file
--log-file
output logs to specified file
--log-verbosity
log verbosity. Higher value means more log
--no-progress
don't display progress bar
--wrgl-dir
parent directory of repo, default to current working directory.
Examples
# fetch 2 missing tables from origin
wrgl fetch tables origin 639c229dd42c53e03d716eaa0829916b a29a4d9a6c445eeb4b32c929d8c1e669
# fetch all missing tables
wrgl fetch tables --missing