Skip to main content

Description

dvc.api.all_commits() returns a list of all Git commit SHAs in a DVC repository. This allows you to iterate over the entire commit history to track how data, models, and metrics have evolved.

Signature

Parameters

str
default:"None"
Location of the DVC repository. Defaults to the current project (found by walking up from the current working directory tree).Can be:
  • Local file system path
  • URL (HTTP/HTTPS)
  • Git SSH URL (e.g., user@server:project.git)

Returns

list[str]
List of Git commit SHAs in the repository

Examples

List commits in current repository

Track metric evolution over time

Compare data across commit history

Build commit history report

Use cases

Historical analysis

Analyze how metrics and data evolved over the project history

Performance tracking

Track model performance improvements across commits

Data lineage

Trace data provenance through commit history

Audit and compliance

Maintain audit trail of all changes to data and models