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
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 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
Related functions
all_branches()- List all branches in a repositoryall_tags()- List all Git tags in a repositoryparams_show()- Get parameters for a specific commitmetrics_show()- Get metrics for a specific commit