Gerrit 2.9/2.10 需安装 download-commands 插件,否则点击变更报 Cannot fetch changes;变更列表默认只显示当前 IDE 项目仓库的变更,为空时需检查 Version Control 注册与 remote 指向;插件内克隆不兼容所有认证方式,失败时改用 SSH 克隆 URL 或先用 Git 插件克隆
gerrit-intellij-plugin
uwolferApache-2.0活跃维护在 IntelliJ IDEA 里直接完成 Gerrit 代码评审的插件,支持查看变更、评论和提交,省去在浏览器和 IDE 之间来回切换。
Gerrit Code Review Tool Integration for the IntelliJ Platform
Settings > Plugins > Marketplace 搜索 "Gerrit" 并 Install,然后重启 IDEREADME 未说明,仅要求 Gerrit 2.9 及以上、IntelliJ 平台 2020.3 及以上的 IDE
在 IntelliJ 里直接评审、拉取和推送 Gerrit 变更,不用切浏览器
在 IntelliJ IDEA 里直接完成 Gerrit 代码评审的插件,支持查看变更、评论和提交,省去在浏览器和 IDE 之间来回切换。
核心能力
- 在编辑器内对文件和行投票、回复与评论
- 在代码行上查看并回复已检出变更的评论
- 用 IDE 语法高亮对比变更与本地克隆
- 推送对话框支持目标分支、topic、评审人、hashtag 与 WIP
- 从 IDE 克隆 Gerrit 项目并自动装 commit-msg 钩子
容易踩的坑
- v2.3.0-203最新正式版2026-10-16 · 2026-10-16 15:42 UTC
What's Changed
- Bump gradle-wrapper from 8.14.5 to 8.14.6 by @dependabot[bot] in https://github.com/uwolfer/gerrit-intellij-plugin/pull/767
- Check out beside a legacy review branch by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/770
- Show comment threads under their lines by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/771
- Prepare release 2.3.0 by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/772
Full Changelog: https://github.com/uwolfer/gerrit-intellij-plugin/compare/v2.2.0-203...v2.3.0-203
- v2.2.0-2032026-10-09 · 2026-10-09 21:22 UTC
查看更新说明
What's Changed
- Let a project pick which Gerrit instance it talks to by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/621
- Explain an empty push to review by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/712
- Reload the changes list when list settings change by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/711
- Offer to install a missing commit-msg hook by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/714
- Suggest accounts for reviewers and CC on push by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/713
- List draft comments in the review dialog by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/715
- Apply the push to Gerrit default without a restart by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/716
- Keep the review dialogs responsive on a slow Gerrit by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/717
- Show avatars next to the owner in the change list by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/719
- Time out reads by what the request does by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/718
- Inspect the files of a change by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/720
- Keep the Gitiles line of a file with a glob name by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/721
- Show and hide list columns from the header menu by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/722
- Require Gerrit 2.9 and fix its change list by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/723
- Read the clone base url from the server info by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/724
- Hide files only a rebase changed in patch set diffs by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/725
- Comment in the unified diff viewer by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/726
- Hand git the right Gerrit credentials by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/729
- Edit comments as Markdown and render code fences by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/728
- Tell agents to plan platform changes on the newest IDE by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/730
- Rework the README and the plugin description by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/731
- Add a per-project switch for the Gerrit integration by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/727
- Keep GerritUtil to the REST calls by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/732
- Reload the change list through a project topic by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/733
- Move the change list columns into their own class by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/734
- Look up services where they are used by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/735
- Announce account changes and save them at once by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/736
- Show the comments of checked out changes in the editor by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/737
- Keep a new comment on its line after a click away by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/738
- Show reloaded comments in an editor being typed in by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/739
- Check an account before saving it by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/740
- Follow an account the remotes pick anew by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/741
- Fix comments in the editor going astray by @uwolfer in https://github.c
- v2.1.0-2032026-10-07 · 2026-10-07 09:46 UTC
查看更新说明
What's Changed
- Implement UpdateInBackground for async action updates by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/625
- Add "Reset Current Branch to Here" change action by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/626
- Do not go on after a failed fetch by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/627
- Compare with the change's commit instead of FETCH_HEAD by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/628
- Check out the change's commit instead of FETCH_HEAD by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/629
- Add Set Assignee action for Gerrit changes by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/630
- Do not fetch a commit which is already local by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/631
- Prefer the best-matching repo for a Gerrit project by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/632
- Keep pushes for review while a setting is unusable by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/634
- Fall back to other Gerrit remotes when a fetch fails by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/633
- Add "Open in Gitiles" for files and commits by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/635
- Prefer the root tracking a change's branch by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/636
- Explain which change actions need a local clone by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/638
- Say what older Gerrit does with a patch set description by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/639
- Raise the documented minimum Gerrit version to 2.8 by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/637
- Name review branches after their patch set by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/640
- Add a "Cherry-Pick" action which commits by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/641
- Fix the reset action on IntelliJ 2026.2 by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/642
- Verify the plugin against the latest IDE in CI by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/643
- Stop after a change cannot be loaded by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/648
- Keep a thread's state when replying to it by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/647
- Resolve the thread when replying "Done" by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/646
- Keep an older load from replacing the change list by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/644
- Set the upstream only of the checked out branch by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/645
- Drop details and diffs which arrive too late by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/649
- Leave the IDE's push target alone without Gerrit push by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/650
- Empty the change panels once the list is replaced by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/651
- Connect to Gerrit through a SOCKS proxy by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/652
- Share the lookup of a repository's Gerrit remote by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/655
- Add a skill to run the plugin in an IDE against Gerrit by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/656
- Run CI on push only for the default branch by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/658
- Share the helper which reloads the list of changes by @uwolfer in https://github.com/uwolfer/gerrit-intellij-plugin/pull/653
- Open log co
- v2.0.1-2032026-09-26 · 2026-09-26 13:20 UTC
这个版本没有写更新说明。
- v2.0.0-2032026-09-12 · 2026-09-12 13:37 UTC
这个版本没有写更新说明。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Gerrit for IntelliJ
Unofficial IntelliJ Platform plugin for Gerrit Code Review: review, fetch and push changes without leaving your IDE.
Features
- Review changes in the IDE: vote, reply and comment on files and lines
- See and answer the comments of a checked out change in the editor, on their lines as you edit the file
- Diff changes against your local clone, with the IDE's syntax highlighting and navigation
- List and query changes, and get notified of new changes waiting for your review
- Push to Gerrit from the push dialog: target branch, topic, reviewers and CC with account suggestions, and on Gerrit 2.15+ a hashtag, WIP and private changes
- Check out, cherry-pick and reset to changes in your local clone
- Submit, abandon, star changes and add reviewers; publish and delete draft changes (Gerrit older than 2.15)
- Run the IDE's inspections on the files a change touches
- Clone Gerrit projects from the IDE, with the commit-msg hook installed
- Open files and commits in Gitiles, and the Gerrit changes of commits selected in the VCS log
- Several Gerrit accounts, one per project
Requirements
- Gerrit 2.9 or newer (older versions lack parts of the REST API)
- Any IDE based on the IntelliJ Platform 2020.3 or newer:
- IntelliJ IDEA
- IntelliJ IDEA CE
- RubyMine
- WebStorm
- PhpStorm
- PyCharm
- PyCharm CE
- AppCode
- Android Studio
- DataGrip
- CLion
- GoLand
- Rider
- MPS
Installation
- From the IDE (recommended, you get notified of updates): Settings > Plugins > Marketplace, search for "Gerrit" and Install.
- Manually: download the release matching your IDE and install it with Settings > Plugins > ⚙ > Install Plugin from Disk....
Then restart the IDE.
Getting started
- Open Settings > Version Control > Gerrit and add an account with the web URL of your Gerrit, your login and your HTTP password (in the Gerrit web UI under Settings > HTTP Credentials, or HTTP Password in older versions). Test checks the connection.
- Open the Gerrit tool window. It lists the changes of the Gerrit projects whose Git repositories are part of your IDE project.
- Push as usual: the push dialog has a "Push to Gerrit" section for the Gerrit options. "Push commits to Gerrit by default" in the settings ticks it in new push dialogs; after that, each project keeps your last choice.
With accounts on several Gerrit instances, add all of them and pick the one a project talks to with Use for This Project. A project whose remotes point at only one of them picks it by itself.
To clone a project from Gerrit, use Get from VCS and pick Gerrit as version control.
Troubleshooting
List of changes is empty
By default, the list only shows changes of the Git repositories in your IDE project.
- Check that the repositories are registered under Settings > Version Control.
- Check that at least one remote of each repository points at the host of your Gerrit account.
- If Gerrit is cloned from another host than its web UI, set the "Clone base URL" of the account.
- Or add a remote named like the Gerrit project, with the Gerrit web URL as its URL.
Error-message on checkout or cherry-pick: "No repository found for Gerrit project"
With "List all Gerrit changes (instead of changes from the currently open project only)", the list also shows changes of projects that are not part of your IDE project. You can vote on and submit these, and review them: the files of such a change, their diff and its comments come from Gerrit. Checking a change out, cherry-picking it and fetching it need the local clone of its project; clone the project and add it to your IDE project for these.
Error-message when clicking a change: "Cannot fetch changes"
Gerrit 2.9 and 2.10 tell the plugin where to fetch a change from only with the
download-commands plugin installed; newer versions do without it. The Gerrit
update procedure offers to install it, but it isn't selected by default, so run
the update again if you skipped it. For an existing or new instance, this
installs it:
java -jar gerrit.war init -d {gerrit-instance} --install-plugin=download-commands
Error-message when loading changes: "Bad Request. Status-Code: 400. Content: too many terms in query."
Enable "List all Gerrit changes (instead of changes from the currently open project only)" in the plugin settings.
Error-message when loading changes: "SSLException: Received fatal alert: bad_record_mac"
Your Gerrit (or the reverse proxy in front of it) only accepts SSLv3. Enable TLS there; SSLv3 is insecure anyway.
Checking out from VCS with Gerrit plugin does not work
Cloning from the plugin does not work with every authentication method. If it fails to authenticate or does not finish:
- use the SSH clone URL in the clone dialog (the Gerrit web UI shows it in the project settings), or
- clone with the Git plugin and add the Gerrit account afterwards.
Background is in this Gerrit mailing list topic.
Loading file-diff-list is slow
The file list and diffs come from Git: the plugin fetches the change from
Gerrit. Running git gc locally and
gerrit gc
on the server (ask your Gerrit administrator) usually helps.
Authenticate against *-review.googlesource.com
In the Gerrit web UI, open Settings > HTTP Credentials >
Obtain password. In the text shown, find the line starting with your
host (e.g. gerrit-review.googlesource.com) and take login and password from
it:
gerrit-review.googlesource.com,FALSE,/,TRUE,12345678,o,git-username.gmail.com=password-until-end-of-line
Here the login is git-username.gmail.com and the password is everything after
the =.
How it works
- IDE integration: a tool window
lists the changes, see
com.urswolfer.intellij.plugin.gerrit.ui. The push dialog has no extension point, so the plugin adds its options to Git's push dialog at startup, seecom.urswolfer.intellij.plugin.gerrit.push. - REST API: most of the communication with Gerrit uses the
Gerrit REST API,
through the standalone gerrit-rest-java-client,
see
com.urswolfer.intellij.plugin.gerrit.rest. - Git: listing the files of a change, diffs, checkout and cherry-pick run on
the local clone with the IDE's Git plugin,
see
com.urswolfer.intellij.plugin.gerrit.git.
Development
Open the project in IntelliJ IDEA with the Gradle, Plugin DevKit and UI
Designer plugins enabled. CONTRIBUTING.md
explains how to build, test and run it in a sandbox IDE. Pull requests go to the
default branch intellij2020.3, which targets the oldest supported IDE, so a
change reaches every newer one.
Support the project
If you like this plugin, you can support it:
- Spread it: tell your friends who use IntelliJ and Gerrit about it.
- Rate it on the JetBrains Marketplace.
- Star it on GitHub.
- Improve it: report bugs and request features, or fix and build them yourself, everything is open source.
- Donate, see below.
Donations
You can support this work with this donation link. If you would rather not use PayPal (it takes 2.9% plus $0.30 of each donation), please contact me. Only trust the link on github.com/uwolfer/gerrit-intellij-plugin.
Credits
- Parts of this plugin are based on the code of the IntelliJ GitHub plugin.
Thanks to JetBrains for providing a free license for developing this project.
Copyright and license
Copyright 2013 - 2026 Urs Wolfer
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.