Skip to main content

Gerrit with Jujutsu

Jujutsu has a very similar model to Gerrit!Gerrit Howand nicenatively itsupports wouldsending beGerrit to integrate them!changes!

Unfortunately, Jujutsu currently doesn't support Gerrit natively. You'You’ll have to rely on a couple of workarounds to get it working.

  1. You need to colocateconfigure witha Git,Gerrit becauseremote. JujutsuIf doesn't quite understand Gerrit'it’s pushnot semantics.
  2. You need to add Change-Id footer that is required by Gerrit. Jujutsu doesn't support git hooks;origin, you maycan use regular Git to amend the commit message to have this footer. Cleaner solution is to teachinstruct Jujutsu to douse this:it seeby thisspecifying (untested)it examplein on.jj/repo/config.toml:

    how
    [gerrit]
    default-remote = "gerrit"       # name of the Git remote to teach Jujutsupush to
    appenddefault-remote-branch = "main"  # target branch in Gerrit
    

    After that, jj gerrit upload -r <revision> will automatically add Change-Id footer.

  3. footers
  4. Youand needsend your changes to gitGerrit, pushprinting usinga regularlink gitto command.
  5. a
resulting patchset to the terminal.

See thisJujutsu issuedocs for trackingmore progress.information.