Skip to main content

Overview

DVC is designed to work seamlessly with Git, enabling teams to collaborate on ML projects just like software projects. While Git tracks code and metadata, DVC tracks data, models, and pipeline outputs.
The key to DVC collaboration: Git tracks .dvc files, while DVC remote storage holds the actual data.

The Collaboration Workflow

1

Initial setup

The first team member initializes the project:
2

Team members clone

Other team members clone and get data:
Configure credentials locally: dvc remote modify --local storage profile myprofile
3

Make changes

Team members work independently:
4

Review and merge

Team reviews and merges changes:

Sharing Data

Adding New Data

When you add data to the project:
Team members get the data:

Updating Existing Data

DVC automatically versions your data. Old versions remain in the cache and remote storage.

Sharing Pipelines

Creating a Pipeline

One team member creates a pipeline:

Running a Shared Pipeline

Team members reproduce the pipeline:
Use dvc pull if you just need the results. Use dvc repro if you want to re-run the pipeline.

Sharing Experiments

Push Experiments to Git Remote

Pull Team Members’ Experiments

Branch-Based Collaboration

Feature Branch Workflow

Merging Branches

If both branches modified the same pipeline stage, you may have merge conflicts in dvc.yaml and dvc.lock. Resolve them like any Git merge conflict.

Handling Merge Conflicts

Conflicts in .dvc Files

When two branches modify the same data:
Resolve by:
1

Choose the version you want

Edit the file to keep one version or combine them.
2

Re-run the pipeline

3

Commit resolved conflict

Conflicts in params.yaml

Resolve, then re-run:

Working with Data Versions

Switch to a Previous Data Version

Compare Data Across Branches

Team Best Practices

Always push data

Run dvc push after git push to ensure team members can access your data

Pull before starting work

Run git pull && dvc pull to get the latest code and data

Use feature branches

Create branches for experiments and features, merge to main when ready

Document pipelines

Add descriptions to stages with --desc for team clarity

Share experiments

Push experiments with dvc exp push origin --all so the team can review

Automate with CI/CD

Set up CI/CD to run dvc repro and validate pipelines automatically

Setting Up CI/CD

GitHub Actions Example

.github/workflows/train.yml

GitLab CI Example

.gitlab-ci.yml

Multi-Team Scenarios

Data Science Team + Engineering Team

1

Data science team

2

Engineering team

Regional Teams with Different Data

Access Control

Read-Only Access

Give some team members read-only access:

Separate Credentials

Each team member uses their own credentials:

Troubleshooting Collaboration Issues

Remember to run dvc pull after git pull:
Or combine them:
Usually safe to accept one version and re-run:
If cache is out of sync:
Check remote credentials:

Complete Team Workflow Example

1

Project lead initializes

2

Data engineer adds data

3

ML engineer builds pipeline

4

Team runs experiments

5

Team reviews results

Next Steps

CI/CD Integration

Automate your ML workflows with continuous integration

Command Reference

Explore all DVC commands for advanced collaboration