dataset_info:
- config_name: Assembly
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 25664270.827623513
num_examples: 507
download_size: 6383845
dataset_size: 25664270.827623513
- config_name: C
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 13034110929.154518
num_examples: 172736
download_size: 4953140102
dataset_size: 13034110929.154518
- config_name: C#
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 5397646765.3076105
num_examples: 138000
download_size: 1656363259
dataset_size: 5397646765.3076105
- config_name: C++
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 23547757257
num_examples: 194218
download_size: 7569744858
dataset_size: 23547757257
- config_name: Dart
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 397294625.4988167
num_examples: 8890
download_size: 154161531
dataset_size: 397294625.4988167
- config_name: Erlang
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 889166050
num_examples: 15623
download_size: 262956120
dataset_size: 889166050
- config_name: Go
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 13724186600.079618
num_examples: 189131
download_size: 7560506015
dataset_size: 13724186600.079618
- config_name: Groovy
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 569309862
num_examples: 16723
download_size: 156155250
dataset_size: 569309862
- config_name: Haskell
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 584392586
num_examples: 13851
download_size: 208126412
dataset_size: 584392586
- config_name: Java
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 15135951136.42295
num_examples: 402369
download_size: 5020550095
dataset_size: 15135951136.42295
- config_name: JavaScript
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 36390392763.94772
num_examples: 694051
download_size: 12357643118
dataset_size: 36390392763.94772
- config_name: Julia
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 99752915.85875197
num_examples: 2662
download_size: 35164706
dataset_size: 99752915.85875197
- config_name: Kotlin
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 339000058
num_examples: 16467
download_size: 101204442
dataset_size: 339000058
- config_name: PHP
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 8837629617.411818
num_examples: 281390
download_size: 3345666898
dataset_size: 8837629617.411818
- config_name: Perl
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 260477378
num_examples: 4930
download_size: 92901210
dataset_size: 260477378
- config_name: PowerShell
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 553399997.1505141
num_examples: 16729
download_size: 301061644
dataset_size: 553399997.1505141
- config_name: Python
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 43401708067
num_examples: 914849
download_size: 14393853016
dataset_size: 43401708067
- config_name: R
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 22395918.040545523
num_examples: 656
download_size: 4801427
dataset_size: 22395918.040545523
- config_name: Ruby
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 4806098257
num_examples: 345124
download_size: 1555780240
dataset_size: 4806098257
- config_name: Rust
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 2750630964.173699
num_examples: 57383
download_size: 1072232323
dataset_size: 2750630964.173699
- config_name: Scala
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 1502090669
num_examples: 46557
download_size: 507218235
dataset_size: 1502090669
- config_name: Shell
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 2727002433.72094
num_examples: 95305
download_size: 623236489
dataset_size: 2727002433.72094
- config_name: Swift
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 831556938.5793096
num_examples: 40271
download_size: 345171247
dataset_size: 831556938.5793096
- config_name: TypeScript
features:
- name: commit
dtype: string
- name: subject
dtype: string
- name: message
dtype: string
- name: repos
dtype: string
- name: file_path
dtype: string
- name: license
dtype: string
- name: unix_time
dtype: int64
- name: new_contents
dtype: string
- name: old_contents
dtype: string
splits:
- name: train
num_bytes: 11236698679
num_examples: 114769
download_size: 3124417123
dataset_size: 11236698679
configs:
- config_name: Assembly
data_files:
- split: train
path: Assembly/train-*
- config_name: C
data_files:
- split: train
path: C/train-*
- config_name: C#
data_files:
- split: train
path: C#/train-*
- config_name: C++
data_files:
- split: train
path: C++/train-*
- config_name: Dart
data_files:
- split: train
path: Dart/train-*
- config_name: Erlang
data_files:
- split: train
path: Erlang/train-*
- config_name: Go
data_files:
- split: train
path: Go/train-*
- config_name: Groovy
data_files:
- split: train
path: Groovy/train-*
- config_name: Haskell
data_files:
- split: train
path: Haskell/train-*
- config_name: Java
data_files:
- split: train
path: Java/train-*
- config_name: JavaScript
data_files:
- split: train
path: JavaScript/train-*
- config_name: Julia
data_files:
- split: train
path: Julia/train-*
- config_name: Kotlin
data_files:
- split: train
path: Kotlin/train-*
- config_name: PHP
data_files:
- split: train
path: PHP/train-*
- config_name: Perl
data_files:
- split: train
path: Perl/train-*
- config_name: PowerShell
data_files:
- split: train
path: PowerShell/train-*
- config_name: Python
data_files:
- split: train
path: Python/train-*
- config_name: R
data_files:
- split: train
path: R/train-*
- config_name: Ruby
data_files:
- split: train
path: Ruby/train-*
- config_name: Rust
data_files:
- split: train
path: Rust/train-*
- config_name: Scala
data_files:
- split: train
path: Scala/train-*
- config_name: Shell
data_files:
- split: train
path: Shell/train-*
- config_name: Swift
data_files:
- split: train
path: Swift/train-*
- config_name: TypeScript
data_files:
- split: train
path: TypeScript/train-*
license: apache-2.0
task_categories:
- text-generation
language:
- en
tags:
- code
- multilingual
- github
- commits
size_categories:
- 1M<n<10M
Overview
Themis-Git-Commits-Merged is a large-scale dataset of ~3.98M single-file code commits from permissively licensed GitHub repositories that have been cross-referenced with GHTorrent pull request data to retain only commits that are part of successfully merged, non-reverted pull requests. This provides implicit human validation of each code change — a merge decision by project maintainers confirms the intent and quality of the commit.
This dataset is derived from Themis-Git-Commits (the raw, unfiltered commit pool) by joining against GHTorrent pull request records through end of 2021 (the temporal extent of the GHTorrent PR data used). It serves as the direct input to the aspect classification and preference construction stages of the Themis pipeline, which produces the commit-based preference pairs in Themis-CodePreference and Themis-CodeRewardBench.
The SQL query used for initial commit mining restricts to repositories under permissive open-source licenses only (MIT, Apache-2.0, BSD-2/3-Clause, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Unlicense, AGPL-3.0, LGPL-2.1, Artistic-2.0). The BigQuery snapshot used contains commits up to early 2022 — predating the widespread availability of LLM code generation tools — ensuring that all code changes in the dataset represent genuine human-authored preferences.
Relationship to Themis-Git-Commits
| Themis-Git-Commits | Themis-Git-Commits-Merged (this dataset) | |
|---|---|---|
| Scope | All mined single-file commits | Only commits in merged, non-reverted PRs |
| Extension filtering | No | Yes (file extension matches target language) |
| PR validation | No | Yes (via GHTorrent, through end of 2021) |
| Human validation | Implicit (authored by humans) | Explicit (merge decision by maintainers) |
| Downstream use | Raw pool for further filtering | Direct input to aspect classification |
Collection Pipeline
The commit mining pipeline is described in detail in the Themis paper and the Dataset folder in the GitHub repository. The BigQuery SQL query and scraping infrastructure are modified from the OctoPack pipeline (CommitPack); the subsequent filtering, classification, and preference construction stages are original to Themis.
BigQuery Mining — A GoogleSQL query (modified from OctoPack) extracts single-file commits from permissively licensed repositories in
bigquery-public-data.github_repos, filtering for target programming languages and non-trivial commit messages.Repository Reputation Filtering — Commits are subset to those originating from curated high-reputation repositories (15+ GitHub stars, 5+ contributors, 10+ issues).
Extension Filtering — Commits are further filtered so the changed file's extension matches a target programming language.
Content Retrieval — The pre-commit (
old_contents) and post-commit (new_contents) file contents are fetched from GitHub via shallow git fetches using retrieve_commit_contents.py.MinHash Deduplication — Near-duplicate content is removed using MinHash LSH deduplication (shingle size 5, 256 permutations, Jaccard threshold 0.7).
Pull Request Cross-Referencing (this step produces this dataset) — Commits are joined with GHTorrent pull request data (through end of 2021) to retain only non-reverted commits that are part of successfully merged pull requests from reputable repositories, ensuring implicit human validation of each code change.
Downstream Processing (Not in This Dataset)
The steps below are applied downstream to produce the final preference pairs in Themis-CodePreference and Themis-CodeRewardBench, and are not reflected in this dataset:
- Language Subsetting — The 24 languages in this dataset are narrowed to the 8 target languages (C, C#, C++, Go, Java, JavaScript, Python, Ruby) used in Themis-CodePreference and Themis-CodeRewardBench.
- Temporal Subsetting — For training data (Themis-CodePreference), only commits pushed before March 2019 are retained. For benchmark data (Themis-CodeRewardBench), commits are scoped to June 2019 – January 2021 from disjoint repositories.
- Aspect Classification — Commits are assigned to quality dimensions (Functional Correctness, Runtime Efficiency, Memory Efficiency, Security Hardness, Readability & Maintainability) using criteria-specialized ModernBERT commit classifiers, trained on seed positives retrieved via curated term lists.
- LLM Scoring & Instruction Synthesis — Frontier LMs validate preference strength and generate realistic inverse instructions.
- LLM-as-a-Judge Preference Labelling — Multi-sample voting with frontier LMs produces consensus preference labels.
Dataset Schema
| Column | Type | Description |
|---|---|---|
commit |
string | Git commit SHA |
subject |
string | First line of the commit message |
message |
string | Full commit message body |
repos |
string | Comma-separated list of repository names containing this commit |
file_path |
string | Path of the changed file |
license |
string | SPDX license identifier of the source repository |
unix_time |
int64 | Committer timestamp (seconds since epoch) |
new_contents |
string | File contents after the commit (post-commit) |
old_contents |
string | File contents before the commit (pre-commit) |
Language Distribution
The dataset is partitioned by programming language, with one config per language. Each config has a single train split.
| Language | Commits | Language | Commits | |
|---|---|---|---|---|
| Python | 914,849 | Rust | 57,383 | |
| JavaScript | 694,051 | Scala | 46,557 | |
| Java | 402,369 | Swift | 40,271 | |
| Ruby | 345,124 | Groovy | 16,723 | |
| PHP | 281,390 | PowerShell | 16,729 | |
| C++ | 194,218 | Kotlin | 16,467 | |
| Go | 189,131 | Erlang | 15,623 | |
| C | 172,736 | Haskell | 13,851 | |
| C# | 138,000 | Dart | 8,890 | |
| TypeScript | 114,769 | Perl | 4,930 | |
| Shell | 95,305 | Julia | 2,662 | |
| R | 656 | |||
| Assembly | 507 | |||
| Total | ~3.98M |
Filters Applied
All filters from the upstream Themis-Git-Commits pipeline apply, plus the PR merge filter:
| Filter | Purpose |
|---|---|
| License allowlist | MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, CC0-1.0, EPL-1.0, MPL-2.0, Unlicense, AGPL-3.0, LGPL-2.1, Artistic-2.0 |
| Language allowlist (SQL) | Python, Java, JavaScript, C, C#, C++, TypeScript, Go, Ruby (repo-level filter in BigQuery query) |
| Message length | 10 < length < 15,000 characters |
| Message blocklist | ~50 low-signal messages excluded (e.g., "initial commit", "wip", "yolo") |
| Pattern exclusion | Merge commits and CI push messages filtered out |
| Same-path constraint | old_path = new_path — file was modified in place, not renamed or moved |
| Single-file constraint | Commit touches exactly one file |
| Content retrieval | Both pre-commit and post-commit file contents successfully fetched |
| Near-deduplication | MinHash LSH with Jaccard threshold 0.7 |
| Extension filtering | Changed file's extension mapped to one of 24 target programming languages (see distribution table) |
| PR merge filter | Commit is part of a successfully merged, non-reverted pull request (GHTorrent data through end of 2021) |
Usage
from datasets import load_dataset
# Load a single language
python_commits = load_dataset("project-themis/git-commits-merged", "Python")
sample = python_commits["train"][0]
print(f"Commit: {sample['commit']}")
print(f"Subject: {sample['subject']}")
print(f"License: {sample['license']}")
print(f"File: {sample['file_path']}")
# Load all languages
for lang in ["C", "CSharp", "Cpp", "Go", "Java", "JavaScript", "Python", "Ruby", "TypeScript"]:
ds = load_dataset("project-themis/git-commits-merged", lang)
print(f"{lang}: {len(ds['train'])} commits")
License
This dataset is released under the Apache 2.0 License. The source commits are drawn exclusively from repositories with permissive open-source licenses (see filter table above).
Citation
@article{themis2025,
title={Themis: Training Robust Multilingual Code Reward Models for Flexible Multi-Criteria Scoring},
author={Paul, Indraneil and Gurevych, Iryna and Glava\v{s}, Goran},
journal={arXiv preprint arXiv:2605.00754},
year={2025}
}