Comment on page
🖥
CLI Basics
Plz has 3 basic commands to help manage your reviews.
plz review
- Our “push” operation. Examines your local branch of commits and creates or updates the corresponding PRs in GitHub.plz sync
- Our “pull” operation. Updates your local branch with the state of any of the reviews in that stack from GitHub.plz status
- Show local state for each review in the stack.
There's also a
plz auth
command that you'll need to run initially in order to use the CLI. Follow the instructions provided to authorize usage of the plz CLI on your behalf.On a working branch, first create a commit with your code changes, then run plz review:
$ git commit -a -m 'Skip rebase when the old and new bases are the same'
[work 0a2ea7b] Skip rebase when the old and new bases are the same
2 files changed, 2 insertions(+)
$ plz review
0babae5b Skip rebase when the old and new bases are the ... created https://plz.review/review/55
Show the local revision and other state:
$ plz status
0babae5b Skip rebase when the old and new bases are the ... (rev 1, current) https://plz.review/review/55
When your PR changes, e.g. due to a base branch change, pull the changes:
$ plz sync
Amend your commit, then run plz review:
$ git commit -a --amend --no-edit
[work 70fd803] Skip rebase when the old and new bases are the same
2 files changed, 2 insertions(+)
$ plz review
70fd803b Skip rebase when the old and new bases are the ... updated https://plz.review/review/55
On a working branch with an existing unmerged commit, create a second commit and run plz review:
$ git commit -a -m 'Support direction parameter for linkedRevisions'
[work 44d4014] Support direction parameter for linkedRevisions
1 file changed, 1 insertion(+)
$ plz review
f7c59230 Support direction parameter for linkedRevisions created https://plz.review/review/57
70fd803b Skip rebase when the old and new bases are the ... unchanged https://plz.review/review/55
Show local state for each review in the stack:
$ plz status
f7c59230 Support direction parameter for linkedRevisions (rev 1, current) https://plz.review/review/57
70fd803b Skip rebase when the old and new bases are the ... (rev 1, current) https://plz.review/review/55
In case you’ve merged or revised an upstream review, synchronize your local state with your origin (GitHub, in our case):
$ plz sync
$ git rebase -i main
Now update the rebase commands to edit the appropriate commit, e.g.:
edit f8bd022 Support direction parameter for linkedRevisions
pick ef534a4 Fix exposed 0 in baseline check
Make any desired code changes, and then run:
$ git commit -a --amend --no-edit
[detached HEAD 3927990] Support direction parameter for linkedRevisions
Date: Sat Apr 23 10:14:50 2022 -0400
1 file changed, 1 insertion(+)
$ git rebase --continue
Successfully rebased and updated refs/heads/work.
$ plz review
The final plz review command will update the PR branch and any subsequent PRs in your stack.
Last modified 1yr ago