Gerrit Code Review
A self-hosted Git server built around code review: every commit is pushed for review first, reviewers vote on it, and only an approved change is merged into the branch. Android and Chromium use it.
- What it is
- Version control
- Type
- Open source
- Made by
- Google and the Gerrit community
- License
- Apache 2.0
- Facts checked
- 20 October 2026
What it is
Gerrit is a Java server that hosts Git repositories and puts a review step in front of every branch. Developers don’t push to main; they push to the special ref refs/for/main, and Gerrit turns each new commit into a change waiting for review. A commit-msg hook adds a Change-Id: line to every commit message. To address comments you amend the commit, keep that line, and push again: Gerrit adds the new version to the same change as another patch set, so the review keeps its history across amends and rebases.
Reviewers comment on diffs and vote on labels. By default Code-Review runs from −2 (“must not be submitted”, a veto) to +2 (approved), and the default submit requirement is at least one +2 and no −2; projects often add a Verified label, from −1 (build or tests failed) to +1. The unit of review is a single commit, not a branch, so a large piece of work becomes a chain of small dependent changes, each reviewed and updated on its own. Since Gerrit 3.0 (May 2019) changes, comments, accounts and groups are stored in Git itself, in a format called NoteDb, instead of a separate SQL database.
The Android Open Source Project reviews all its code in Gerrit (uploads go through repo upload), and so does Chromium (through git cl upload). A new minor version ships about every six months: 3.13.0 on November 10, 2025 and 3.14.0 on May 15, 2026, with 3.14.4 the latest in September 2026 and 3.15.0 planned for November 13, 2026. Version 3.14 turned on Review Agent, AI-assisted review, by default whenever a plugin providing an AI review model is installed; private changes are not shared with it.
Why teams pick it
- Review is enforced by the server, not by convention: changes reach a branch only through submit rules such as one +2, no −2 and a passing Verified vote
- Reviews single commits, so big work can land as a chain of small changes, each reviewed and amended separately with its full patch-set history
- Proven at very large scale on projects such as Android and Chromium, which run their own public Gerrit instances
- Free software under Apache 2.0, and since 3.0 the review data lives in Git repositories rather than a separate database
Watch out for
- An unfamiliar workflow for people used to pull requests: install a commit hook, push to
refs/for/…, and amend commits instead of adding fix-up commits - A review server, not a whole forge: there is no issue tracker or CI built in, so those come from separate tools
- You run it yourself, and some upgrades need a full reindex (3.14 moved the changes index from version 87 to 88)
- Only the newest minor versions are supported: 3.11 reached end of life when 3.14 shipped, so staying supported means upgrading about once a year
Alternatives
What all version control have in common →Compare side by side →
AWS CodeCommitAWSAWS’s managed Git hosting: private repositories inside an AWS account, with access controlled by IAM instead of separate user accounts, pull requests with approval rules, and triggers into other AWS services.jj, where the working copy is itself a commit, every operation can be undone, and conflicts are stored in commits instead of stopping you.sl client that works with Git repositories and makes stacks of commits and undo easy, plus a server and virtual filesystem that scale it to Meta’s monorepo.ScionCommercialAnthropic’s in-house version control system for its monorepo, built for clients that are always online: the server makes commits and answers history questions, and clients fetch only the files they read.How it fits with other technologies
What Gerrit Code Review uses
Upload a change for review, then a second patch set · bash
# once per clone: the hook that adds a Change-Id line to each commit message
scp -p mygerrit:hooks/commit-msg .git/hooks/
git commit -m "Extend login session timeout"
git push origin HEAD:refs/for/main # creates a change for review on main
# reviewer asks for a fix: amend, keep the Change-Id, push again
git commit --amend
git push origin HEAD:refs/for/main -o topic=login # patch set 2 of the same changeSee it in a real stack
No architecture uses Gerrit Code Review yet. Drop it into the playground and wire it up yourself.Open playground →Where it came from2005–2026
Gerrit comes from Google’s internal code review. In 2005 Guido van Rossum began Mondrian, a tool for reviewing every change before it was submitted to Google’s central Perforce repository; it depended on Google-only services such as Bigtable, so it could not be released. In 2008 he open-sourced parts of it as Rietveld, which ran on Google App Engine and worked with Subversion. Rietveld was strictly advisory: it did not stop anyone from submitting unreviewed code.
Android had chosen Git, and its engineers wanted something like Mondrian for it. App Engine was a deal-breaker, because the phone makers working on Android keep internal repositories and won’t rely on an outside service. Gerrit started as a set of patches to Rietveld for the Android Open Source Project and became a fork once it added access control that van Rossum did not want in Rietveld’s code. It is named after Gerrit Rietveld, the Dutch architect after whom Rietveld was named. Shawn Pearce, who had reimplemented Git in Java as JGit, led the project, and Gerrit 2.0 (January 2009) was a full rewrite from Python on App Engine to Java with a SQL database. By October 2009 HTC, Qualcomm, TI, Sony Ericsson and Google were running it.
Over the next decade Gerrit moved its data into Git. Pearce told LWN in 2009 that Gerrit not working offline was “a bug” and listed storing metadata in Git as planned work; Gerrit 3.0, in May 2019, removed the old database (“ReviewDb”) for changes, accounts, groups and projects, and dropped the old GWT web interface for the newer PolyGerrit one. Releases now come about every six months, and 3.14 (May 2026) added AI-assisted review as a built-in step.
Why it’s built this way
- Enforce review on the server
- Rietveld only advised; nothing stopped a direct submit. Android’s partners needed control over who could change what, and adding those access-control features is what turned Gerrit from a set of Rietveld patches into a fork.
- Review one commit at a time, tracked by a Change-Id
- A commit’s hash changes every time it is amended or rebased. A Change-Id line in the message stays the same, so Gerrit can recognize a reworked commit as a new patch set of the same change instead of a new review.
Timeline
- 2005
Guido van Rossum begins Mondrian, Google’s internal review tool
- 2008
Rietveld released; Gerrit begins as patches to it for the Android Open Source Project
- 2009
Gerrit 2.0, the Java rewrite (January 26)
- 2019
Gerrit 3.0 removes ReviewDb and the GWT interface (May 15)
- 2025
Gerrit 3.13.0 (November 10)
- 2026
Gerrit 3.14.0 with Review Agent (May 15); 3.15.0 planned for November 13
- Gerrit Code Review: Gerrit’s history (Mondrian, Rietveld, Android, the fork and the name)
- Don Marti for LWN: Gerrit, Google-style code review meets git (Oct 30, 2009)
- GerritCodeReview/gerrit on GitHub: tag v2.0 (Jan 26, 2009)
- Gerrit Code Review: Release notes for Gerrit 3.0 (ReviewDb removed, NoteDb, GWT UI removed)
- GerritCodeReview/gerrit on GitHub: tag v3.0.0 (May 15, 2019)
- GerritCodeReview/gerrit on GitHub: tag v3.13.0 (Nov 10, 2025)
- Gerrit Code Review: Release Plan for Gerrit 3.14 (final release May 15; 3.11 end of life) (Jan 26, 2026)
- Gerrit Code Review: Release notes for Gerrit 3.14 (Review Agent)
- Gerrit Code Review: Release Plan for Gerrit 3.15 (final release November 13) (Sep 30, 2026)
Sources13 · facts checked 20 October 2026
- Gerrit docs: Uploading changes (refs/for, commit-msg hook, new patch sets, push options)
- Gerrit docs: Change-Id lines
- Gerrit docs: Review labels (Code-Review −2 to +2, Verified, submit requirements)
- Gerrit Code Review: Release notes for Gerrit 3.0 (NoteDb)
- Gerrit Code Review: Release notes for Gerrit 3.14 (Review Agent, index v87 to v88 needs a full reindex, 3.14.4 latest)
- Gerrit Code Review: Releases (3.11 and older end of life)
- Gerrit Code Review: Release Plan for Gerrit 3.15 (Sep 30, 2026)
- GerritCodeReview/gerrit on GitHub: tag v3.14.0 (May 15, 2026)
- GerritCodeReview/gerrit on GitHub: tag v3.14.4 (Sep 23, 2026)
- Android Open Source Project: Submit code changes (AOSP relies on Gerrit; repo upload) · archived copy, original
- Chromium docs: Contributing to Chromium (Gerrit, git cl upload, relation chains)
- Don Marti for LWN: Gerrit, Google-style code review meets git (Oct 30, 2009; bug tracker integration)
- GerritCodeReview/gerrit on GitHub: mirror (Apache-2.0, Java)