Subcommands43 subcommands
gt aliases
Edit your command aliases
gt auth
Add your auth token to enable Graphite CLI to create and update your PRs on GitHub
gt bottom
Switch to the first branch from trunk in the current stack
gt changelog
Show the Graphite CLI changelog
gt checkout
Switch to a branch. If no branch is provided, opens an interactive selector
gt children
Show the children of the current branch
gt completion
Set up bash or zsh tab completion
gt config
Configure the Graphite CLI
gt continue
Continues the most recent Graphite command halted by a merge conflict
gt create
Create a new branch stacked on top of the current branch and commit staged changes. If no branch name is specified but a commit message is passed, generate a branch name from the commit message
gt dash
Open the web dashboard
gt delete
Delete a branch and its corresponding Graphite metadata
gt docs
Show the Graphite CLI docs
gt down
Switch to the parent of the current branch
gt feedback
Commands for providing feedback and debug state
gt fish
Set up 'fish' tab completion
gt fold
Fold a branch's changes into its parent, update dependencies of descendants of the new combined branch, and restack
gt get
Get branches from trunk to the specified branch from remote, prompting the user to resolve conflicts. If no branch is provided, get downstack from the current branch
gt info
Display information about the current branch
gt init
Initialize Graphite in this repository by selecting a trunk branch. Can also be used to change the trunk branch of the repository
gt log
Commands that log your stacks
gt log
Log all branches tracked by Graphite, showing dependencies and info for each
gt log long
Display a graph of the commit ancestry of all branches
gt log short
Log all stacks tracked by Graphite, arranged to show dependencies
gt merge
Merge the pull requests associated with all branches from trunk to the current branch via Graphite
gt modify
Modify the current branch by amending its commit or creating a new commit. Automatically restacks descendants. If you have any unstaged changes, you will be asked whether you'd like to stage them
gt move
Rebase the current branch onto the target branch and restack all of its descendants. If no branch is passed in, opens an interactive selector
gt parent
Show the parent of the current branch
gt pop
Delete the current branch but reaint the state of files in the working tree
gt pr
Opens the pull request page for a branch or PR number. If no branch is passed, the current branch's PR is opened
gt rename
Rename a branch and update metadata referencing it. If no branch name is supplied, you will be prompted for a new branch name. Note that this removes any associated GitHub pull request
gt reorder
Reorder branches between trunk and the current branch, restacking all of their descendants. Opens an editor where you can reorder branches by moving around a line corresponding to each branch
gt restack
Ensure the current branch is based on its parent, rebasing if necessary. If conflicts are encountered, you will be prompted to resolve them via an interactive Git rebase
gt revert
Create a branch that reverts a commit on the trunk branch. Currently experimental
gt split
Split the current branch into multiple single-commit branches
gt squash
Squash all commits in the current branch and restack upstack branches
gt submit
Idempotently force push the current branch to GitHub, creating or updating a pull request. Opens an interactive prompt that allows you to input pull request metadata. 'gt ss' is a default alias for 'gt submit --stack'
gt sync
Pull the trunk branch from remote and prompt to delete any branches that have been merged. Restacks all branches in your repository that can be restacked without conflicts. If trunk cannot be fast-forwarded to match remote, overwrites trunk with the remote version
gt top
Switch to the tip branch of the current stack. Prompts if ambiguous
gt track
Start tracking the current (or provided) branch with Graphite by selecting its parent. This command can also be used to fix corrupted Graphite metadata
gt trunk
Switch to the trunk branch
gt untrack
Stop tracking a branch with Graphite. If the branch has children, they will also be untracked. Default to the current branch if none is passed in
gt up
Switch to the child of the current branch. Prompts if ambiguous