plz.review docs
Search
K

Merging reviews

Once your first review 55 is approved you will want to merge it into the main branch. This can be accomplished from the review page on plz.review by clicking the Merge button:
image.png
Once merged, the timeline on the review page will reflect this change, and the state of the remote git repo will change:
image.png
image.png
Here, an identical commit to obabae5 has been created (365d625) and merged into main in it’s place. The local Git state has not yet been updated, and this will be reflected by plz status:
$ plz status
f7c59230 Support direction parameter for linkedRevisions (rev 1, current) https://plz.review/review/57
0babae5b Skip rebase when the old and new bases are the ... (rev 1, behind) https://plz.review/review/55/revision/1
As shown above, the local state of review 57 is “behind”, meaning that rev 1 (0babae5) is not the latest revision. To synchronize the local repo state with what’s on the remote, you can run plz sync:
$ plz sync
some commits are ahead, run git rebase --onto 365d6250e7f8d47461bb1a4567668965b1681c61 work~1
image.png
The local main branch state has been updated to match the remote, but plz sync has instructed us to run a git rebase command. Specifically it’s asking us to transplant one commit from the work branch onto the merged commit 365d625. Running this command and then running plz status again shows:
$ git rebase --onto 365d6250e7f8d47461bb1a4567668965b1681c61 work~1
Successfully rebased and updated refs/heads/work.
$ plz status
7b5f881a Support direction parameter for linkedRevisions (modified) https://plz.review/review/57
365d6250 Skip rebase when the old and new bases are the ... (merged) https://plz.review/review/55
image.png
Review 55 is now “merged” and it will be unaffected by further stack operations. Review 57 is no longer “behind”, it’s now “modified”, meaning that 7b5f881 will be a new revision when pushed, which we can do by running plz review:
$ plz review
7b5f881a Support direction parameter for linkedRevisions updated https://plz.review/review/57
$ plz status
7b5f881a Support direction parameter for linkedRevisions (rev 2, current) https://plz.review/review/57
365d6250 Skip rebase when the old and new bases are the ... (merged) https://plz.review/review/55
image.png
This routine of running plz sync, git rebase, and plz review is central to the workflow of the plz CLI.