Skip to main content
gx view shows a compact view of your current branch’s stack position, including PR status when gh (GitHub CLI) is available.

Usage

Behavior

gx view adapts its output based on where you are:

On a stacked branch

Shows the full stack chain with PR status, ahead count, age, and a marker for the current branch:
The < marker indicates your current branch.

On trunk (main/master)

Shows all stacks branching from trunk:

On an untracked branch

If the current branch is not part of a stack:

PR Status

When the GitHub CLI (gh) is installed, gx fetches PR status for each branch and shows:
PR status fetching requires the gh CLI to be installed and authenticated. If gh is not available, the PR column is simply omitted.
  • The stack chain is built by walking up from the current branch to trunk, then down through descendants
  • The “ahead” count is relative to each branch’s parent, not trunk
  • The “age” column shows when the branch was last committed to
  • On trunk, single-branch stacks show just the branch name; multi-branch stacks show the full chain with a count