The Graphite CLI enables engineers to use the Graphite workflow everyday as they make changes to their company's codebase while staying fully compatible with Git and GitHub pull requests.
The Graphite workflow has three main principles:
gt create
gt modify
gt submit
gt sync
gt create
creates a new Git branch with a single commit that represents an atomic change to the repository, "stacked" on the currently checked out branch (formerly gt branch create
).
gt modify
**allows the user to modify a code change without needing to worry about rebasing any dependent ("upstack") branches. (formerly gt commit amend
/gt commit create
). By default, it amends the current commit of the branch.
gt submit
allows the user to submit or update PRs for their stack of changes via an interactive prompt (that can be skipped with flags). By default it will submit or update the currently checked out change and anything it depends on ("downstack"), but with a flag (something like-s
for --stack
or -a
for -all
) it will submit PRs for "upstack" branches as well. All of these flags will be configurable, but the default flow with the interactive prompt should be acceptable in the common case. ``
gt sync