Gerrit Mode
Use Gerrit mode in GitButler to have a simple and powerful client for the Gerrit code review system
Not everyone uses GitHub or GitLab to review code and collaborate. If you use the Gerrit code review tool, GitButler has a mode for you! In fact, GitButler is the best Gerrit client there is.
What is Gerrit
If you've never heard of Gerrit, it's used by large teams like the Android or Chrome projects to manage huge numbers of changes and users across large numbers of interdependent repositories.
Here is an example of incoming changesets on the Android project:

How is Gerrit different than Pull/Merge Requests?
Good question. With GitHub or GitLab, when you send a pull/merge request, the review process is branch based. If you add more commits on top of your branch, the changes are squashed into one big unified diff for review. Most teams tend to avoid rebasing anything that was already shared.
Gerrit is a commit based review system. Every review is based on exactly one commit. It's very common to edit shared commits and submit new versions of them to address feedback.
This model works very well with GitButler's easy commit editing features. With any other Git client, interactive rebasing and amending tends to be quite painful and error prone, making it fairly difficult to work with Gerrit's model. With GitButler, it's ideal. Just drag and drop changes and update your changesets easily.
How to turn on Gerrit Mode
If you have a Gerrit remote, GitButler will automatically enable Gerrit Mode when the project is being added to GitButler. You can also enable it manually.
To manually turn on Gerrit Mode in GitButler, you just have to set a Git config option called gitbutler.gerritMode in the project you want to act in a Gerrit compatible fashion:
What is Gerrit Mode
Now GitButler will change it's behavior in the following ways:
- When you commit, we will automatically inject a Change-Idtrailer into the commit in the format that Gerrit expects. You do not need to setup acommit-msghook like you do with other Git clients.
- When you push, it will not push to a matching branch name on the remote. Instead it will push to refs/for/main(or whatever the name of the target branch is set to be).
- After a push, we record the change url and show you the link and number for each commit automatically.

We can also set some extra push options when we push, including:

Last updated on