---
schema_version: 1
route: /t/dvc.md
tool: "dvc"
---

# sincecutoff.com /t/dvc — DVC

- name: DVC
- kind: cli
- children: none
- homepage: <https://github.com/iterative/dvc>

Changes to the tools coding agents drive, since a model's training cutoff, each linked to its first-party source. Check installed versions and limitations before acting; a cutoff date does not establish what a model knows.
Original editorial content: [Apache 2.0](https://sincecutoff.com/v1/data-license.txt), by [0xPatrick](https://0xpatrick.dev). Preserve applicable license and [NOTICE](https://sincecutoff.com/notice.txt) attribution when redistributing. Third-party source text and examples retain their own rights. [License scope and attribution](https://sincecutoff.com/v1/license.json).
To stay current, read the changes feed: [`/v1/changes.md?tool=dvc`](https://sincecutoff.com/v1/changes.md?tool=dvc) (or `.json`), adding `since=YYYY-MM-DD` for your training cutoff. Entries for registered children are included; the registry itself is `/v1/tools.json`. How to page and save your place: [llms.txt](https://sincecutoff.com/llms.txt).

### dvc gc supports --num with --all-branches (2026-03-31)
- slug: dvc-gc-supports-num-with-all-branches-18f1d97354fc
- score: 0.95

How to use it:

When cleaning a shared cache, run `dvc gc` with `--all-branches --num <N>` to keep data referenced by the last N commits from each branch tip. Add `--projects <path>... --force` to preserve the union across the current project and listed projects without a confirmation prompt.

Examples:

```
dvc gc --all-branches --num 2 --projects <project-path>... --force
```

- why_it_matters: When garbage-collecting repositories whose branches share a cache, preserve the last N commits from each branch tip.
- sources: <https://github.com/treeverse/dvc/releases/tag/3.67.1>, <https://github.com/treeverse/dvc/pull/11013>, <https://doc.dvc.org/command-reference/gc>
- gotchas: "Version: 3.67.1"; "--all-branches (or -a) (required): Keep cached data referenced in all Git branches, as well as the workspace; with `--num`, select the last N commits from each branch tip."; "--num <num> (or -n <num>) (required): Keep cached data referenced in the last N commits from each selected revision root, as well as the workspace. Can be used with `--all-branches`."; "--projects <paths> (or -p <paths>): Specify one or more project paths whose data should be preserved when projects share a cache or remote; together with `--all-branches --num`, DVC preserves the union across the current and listed projects."; "--force (or -f): Force garbage collection and skip the confirmation prompt."; "Prerequisite: For shared-cache preservation, pass paths for the other DVC projects; ensure their relevant commits and branches have been pulled first."; "The shared-cache union behavior applies when `--projects` repositories share the same cache."
