Skip to main content

Synopsis

Description

The dvc pull command downloads DVC-tracked files from remote storage to your local cache and checks them out to your workspace. It’s a combination of dvc fetch and dvc checkout. This is analogous to git pull but for your data files. Use dvc pull to:
  • Get data after cloning a repository
  • Sync data after pulling Git changes
  • Download data for a specific branch or experiment
  • Restore missing or deleted data files
The command:
  1. Downloads missing files from remote storage to local cache
  2. Creates links (or copies) from cache to workspace
  3. Updates your workspace to match the .dvc file specifications
You must configure a remote storage location before using dvc pull. Use dvc remote add to set up a remote, or check .dvc/config if your team has already configured one.

Options

path
Limit command scope to specific tracked files/directories, .dvc files, or stage names. If not specified, pulls all tracked data.
string
Remote storage to pull from. If not specified, uses the default remote configured in .dvc/config.
integer
default:"4 * cpu_count()"
Number of jobs to run simultaneously. Higher values increase parallelism but use more resources.
boolean
default:"false"
Fetch cache for all Git branches.
boolean
default:"false"
Fetch cache for all Git tags.
boolean
default:"false"
Fetch cache for all Git commits.
This can download a very large amount of data. Use with caution.
boolean
default:"false"
Do not prompt when removing working directory files. Forces overwrite of modified files.
This will discard any local modifications to tracked files.
boolean
default:"false"
Fetch cache for all dependencies of the specified target.
boolean
default:"false"
Pull cache for subdirectories of the specified directory.
boolean
default:"false"
Fetch run history for all stages.
boolean
default:"false"
Ignore errors if some of the files or directories are missing from remote.
Useful in CI/CD where you may not need all data files.

Examples

Basic pull

Pull all tracked data from the default remote:
Or if everything is up to date:

Initial setup after cloning

Common workflow after cloning a repository:

Pull after Git changes

Sync data after pulling Git changes:

Pull specific files

Pull only specific targets:

Pull from specific remote

Pull from a named remote:

Pull with higher parallelism

Speed up pull with more concurrent jobs:

Force pull

Overwrite local changes:
This discards any uncommitted local changes to tracked files.

Pull with dependencies

Pull a pipeline stage and all its dependencies:

Pull all branches

Fetch data for all branches (useful for caching):

Example workflows

Workflow 1: New team member

Workflow 2: Switch branches

Workflow 3: Sync with team changes

Workflow 4: CI/CD pipeline

Workflow 5: Selective data loading

Setting up remotes

Before using dvc pull, ensure a remote is configured:
Common remote types:

Understanding pull output

File status indicators: Summary line:
Or when everything is synced:

Error handling

No remote configured

Solution: Configure a remote:

Authentication errors

Solution: Configure credentials. For S3:

Missing files in remote

Solution: Either:
  1. Ask teammate to push: dvc push
  2. Use --allow-missing to skip missing files:

Network interruption

If pull is interrupted, simply run it again:
DVC will resume from where it left off.

Difference between pull, fetch, and checkout

Use dvc pull for most cases - it does both fetch and checkout.Use dvc fetch when you want to pre-download data without changing workspace.Use dvc checkout when data is already in cache and you just need to update workspace.

Performance tips

Increase parallelism - Use --jobs for faster downloads:
Pull selectively - Only pull what you need:
Use —allow-missing - In CI/CD, skip missing files to avoid errors:
Pre-fetch in CI - Cache DVC data between CI runs to speed up builds.

Best practices

  1. Always pull after git pull: Keep data in sync with code
  2. Pull before starting work: Ensure you have latest data
  3. Use specific targets in CI: Only pull data needed for tests
  4. Configure credentials securely: Use environment variables or IAM roles
  • dvc push - Upload data to remote storage
  • dvc fetch - Download to cache only
  • dvc checkout - Update workspace from cache
  • dvc status - Check sync status with remote