🎮CLI User Guide
Last updated
Last updated
The plz CLI is a tool for managing stacks of reviews. Basic usage for this tool is described in How to plz. This document digs into plz operations in more detail, including how they interact with the underlying Git repo. Understanding these concepts will help you get the most out of plz.
Let’s start with a simple situation: you’ve cloned a repo and you have the main branch checked out locally. You can look at the history of the main branch using git log:
Pictured below we have an up-to-date main branch, with the most recent commit being 23170d4:
Suppose now that you’ve made some local changes, but you haven’t committed those changes:
Ultimately we wish to create a PR from these changes so that we can merge them into the main branch. The first step is to create a local working branch and commit the change as follows:
The diagram above shows the outcome of these operations:
A new commit 0a2ea7b
has been created
The work branch has been pointed at this new commit
These changes have only affected our local repository, the remote has not changed. The red parts of the diagram represent the local state that diverges from the remote, and the black parts represent state that’s identical locally and on the remote. See the Diagram legend for more details.
The workflows described in this document make heavy use of diagrams to depict the state of the local and remote git repositories.