Skip to content

Commit

Permalink
FAQ: Describe how to integrate with Gerrit.
Browse files Browse the repository at this point in the history
This question is mildly popular on Discord so it's finally time to have an answer.

We should do something better in the future but the current solution is good enough for today.

cc @thoughtpolice
  • Loading branch information
PhilipMetzger committed Jan 1, 2024
1 parent dad890b commit c2973fd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,27 @@ Usually, the different commits associated with the conflicted branch should all
appear in the log, but if they don't you can use `jj branch list`to show all the
commits associated with it.

### How do I integrate Jujutsu with Gerrit?

At the moment you'll need a script, which adds the required fields for Gerrit
like the `Change-Id` footer. Then `jj` can invoke it via an `$EDITOR` override
in an aliased command. Here's an [example][gerrit-integration] from an
contributor (look for the `jj signoff` alias).

After you have attached the `Change-Id:` footer to the commit series, you'll
have to manually push `git push` your `HEAD` into the remote Gerrit branch
`refs/for/$BRANCH`, where `$BRANCH` is the base branch you want your changes to
go to.

We hope to integrate with Gerrit natively in the future.

[branches_conflicts]: branches.md#conflicts

[change ID]: glossary.md#change-id
[commit ID]: glossary.md#commit-id
[config]: config.md

[gerrit-integration]: https://gist.github.com/thoughtpolice/8f2fd36ae17cd11b8e7bd93a70e31ad6
[gitignore]: https://git-scm.com/docs/gitignore

[glossary_divergent_change]: glossary.md#divergent-change
Expand Down

0 comments on commit c2973fd

Please sign in to comment.