.gitignore for DVC

3 ignore rules for DVC, ready to copy into your repository.

Data Version Control for data and machine learning projects

The complete .gitignore for DVC

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-09-17 18:11:07 UTC
# Technologies: DVC

### DVC ###
# DVC local config (credentials, local remotes)
.dvc/config.local
# DVC temporary files and locks
.dvc/tmp
# DVC local data cache
.dvc/cache

What these DVC rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

Local DVC configuration, temporary files and cache

Pattern What it ignores
.dvc/config.local DVC local config (credentials, local remotes)
.dvc/tmp DVC temporary files and locks
.dvc/cache DVC local data cache

How to use this .gitignore for DVC

  1. Copy the DVC rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other Tool .gitignore templates

See every Tool template