Aller au contenu

Leçon 1 · Getting Started

What Is DVC? Data Version Control Explained

Learn what DVC is, why Git alone struggles with large datasets and models, who this tutorial is for, what it can run, and how the whole course is organized.

Code is easy to version. You commit it, you go back to an old commit, and you get exactly the old files. Data and models are harder. A dataset can be many gigabytes, it changes for reasons that have nothing to do with code, and putting it straight into Git makes the repository slow and heavy. DVC (Data Version Control) is a command-line tool that solves this by working next to Git.

The idea is short. DVC stores the large files elsewhere and writes a small text file that describes them. Git versions the small text file. When you check out an old commit, DVC uses that description to bring back the matching data.

Who this tutorial is for

You will get the most from it if you train models, build reports from changing data, or support people who do. You should be comfortable with:

  • a terminal (changing folders, running commands);
  • Git basics: commit, branch, merge, push (see the Git tutorial);
  • a little Python, because the examples and stand-ins use it.

You do not need machine learning expertise. A "model" in this course can be any file that a script produces from data.

The problem DVC solves

Picture a small team. One person renames the data file to train_v2_final.csv. Another has a model file but cannot say which data made it. A third reruns a script, gets a different score, and nobody knows why. DVC addresses three separate needs, and then the course follows them chapter by chapter.

Three needs, one tool

Version data Large files follow your commits
Reproduce work Pipelines rerun only what changed
Compare experiments Params and metrics side by side
1 / 4

How DVC relates to Git

DVC is not a replacement for Git and it does not need a server of its own. A DVC project is normally a Git repository with an extra .dvc/ folder. You keep using git add and git commit. You add a few dvc commands around them.

Terminal
# Read-only: the typical rhythm in a real project
dvc add data/reviews.csv          # DVC takes over the large file
git add data/reviews.csv.dvc data/.gitignore
git commit -m "Add review dataset"
dvc push                          # upload the data
git push                          # upload code and metadata

DVC is also different from a data warehouse or a database. It versions files and folders. It does not query rows, and it does not track changes inside a running database.

Who maintains DVC

DVC is open source. It was created at Iterative. In November 2025, lakeFS announced that it had acquired the DVC open-source project from Iterative and said DVC would continue as an independent tool. This is the situation as of December 2026; check the project website for news. This tutorial is independent. It is not affiliated with or endorsed by lakeFS, Iterative or any cloud provider.

What this tutorial can and cannot run

The code boxes on this site run Python, SQL and JavaScript in your browser. This course uses Python with the standard library only. The boxes cannot install DVC, run Git, or reach a cloud bucket. So you will see two kinds of examples:

Kind How it looks What it means
Real commands and files Read-only blocks Use them in your own terminal and project
Stand-ins Runnable boxes titled "Stand-in:" Small Python programs that imitate one DVC idea

A stand-in is a teaching model. Its output is not DVC output. Real DVC does much more (locking, links, storage protocols), and its messages look different. Try the commands in a scratch repository to see the real behavior.

Here is your first stand-in. It shows the core trick: a short fingerprint can stand for a larger piece of data.

Python Stand-in: a fingerprint describes the data

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The fingerprint has the same length for a tiny file or a huge one. That is why Git can store it cheaply while DVC keeps the real bytes somewhere else. The next lessons show where.

When you may not need DVC

DVC is a good fit when files are too big or too binary for Git, when results must be traced back to inputs, or when a workflow has several steps. It adds little if your data is a few kilobytes of CSV that Git handles well, or if your data lives only in a database that already keeps history. Also remember that DVC does not make a random training script deterministic. It records what went in and what came out; fixing random seeds and library versions is still your job. For the wider picture, see MLOps.

A short story of one change

Follow one change through a DVC project to see how the pieces fit. On Monday a teammate adds 2,000 new reviews to the dataset. They run dvc add, which records a new fingerprint in a small file. They commit that file with a message such as "Add October reviews" and push both the data and the commit.

On Friday the model score drops. You open the Git history and see exactly which commit changed the data. You can check out the commit before it, restore the old data, and run the same code again. If the old score returns, the data is the likely cause. If it does not, you look at code, settings or library versions next. Without versioned data, you would be guessing.

Notice what made this possible. The history has one timeline for code and data, so "what did we have on Monday?" has a precise answer. That is the main promise of this tool, and every later lesson builds on it.

How to study this course

Read the lessons in order the first time. Pipelines build on tracking and remotes, and experiments build on pipelines. Keep a scratch repository open in your own terminal and repeat the read-only commands with small made-up files. When a command can delete or overwrite something, the lesson says so; practice those only in the scratch project.

Check your understanding

Quick check · 3 questions

of 3 answered You scored / 3 · perfect!

  1. 1. What does Git store for a file that DVC tracks?

    DVC writes a small text file with a hash and other details, and Git versions that file.
  2. 2. Which statement about DVC and Git is correct?

    Git keeps the code and metadata history. DVC handles the large content.
  3. 3. What are the runnable boxes in this tutorial?

    The browser cannot run DVC, so the boxes are clearly labeled teaching models.

Summary

  • Git handles code well but struggles with large, changing data files.
  • DVC stores content outside Git and gives Git a small description of it.
  • DVC helps with versioning data, reproducing pipelines and comparing experiments.
  • Real DVC commands are read-only here; runnable boxes are labeled stand-ins.
  • This is an independent tutorial; DVC is maintained under lakeFS as of December 2026.

Next: Install and Initialize DVC

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.