gt branch
Commands that operate on your current branch
Subcommands
Name | Description |
---|---|
bottom, b | Switch to the first branch from trunk in the current stack |
checkout, co | Switch to a branch. If no branch is provided, opens an interactive selector |
create, c | 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 |
delete, dl | Delete a branch and its corresponding Graphite metadata |
down, d | Switch to the parent of the current branch |
edit, e | Run an interactive rebase on the current branch's commits and restack upstack branches |
fold, f | Fold a branch's changes into its parent, update dependencies of descendants of the new combined branch, and restack |
info, i | Display information about the current branch |
rename, rn | 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 |
restack, r | Ensure the current branch is based on its parent, rebasing if necessary |
split, sp | Split the current branch into multiple single-commit branches |
squash, sq | Squash all commits in the current branch and restack upstack branches |
submit, s | Idempotently force push the current branch to GitHub, creating or updating a pull request |
top, t | Switch to the tip branch of the current stack. Prompts if ambiguous |
track, tr | Start tracking the current (or provided) branch with Graphite by selecting its parent. This command can also be used to fix corrupted Graphite metadata |
untrack, ut | 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 |
up, u | Switch to the child of the current branch. Prompts if ambiguous |