gt branch

Commands that operate on your current branch

Subcommands

NameDescription
bottom, bSwitch to the first branch from trunk in the current stack
checkout, coSwitch to a branch. If no branch is provided, opens an interactive selector
create, cCreate 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, dlDelete a branch and its corresponding Graphite metadata
down, dSwitch to the parent of the current branch
edit, eRun an interactive rebase on the current branch's commits and restack upstack branches
fold, fFold a branch's changes into its parent, update dependencies of descendants of the new combined branch, and restack
info, iDisplay information about the current branch
rename, rnRename 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, rEnsure the current branch is based on its parent, rebasing if necessary
split, spSplit the current branch into multiple single-commit branches
squash, sqSquash all commits in the current branch and restack upstack branches
submit, sIdempotently force push the current branch to GitHub, creating or updating a pull request
top, tSwitch to the tip branch of the current stack. Prompts if ambiguous
track, trStart tracking the current (or provided) branch with Graphite by selecting its parent. This command can also be used to fix corrupted Graphite metadata
untrack, utStop 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, uSwitch to the child of the current branch. Prompts if ambiguous