DubStack
Commands

dub checkout

Checkout a branch directly or use the interactive picker, plus stack navigation commands.

Checkout

# Checkout explicit branch
dub checkout feat/auth-login

# Interactive picker (fuzzy search + rich branch metadata)
dub checkout

# Checkout trunk for current tracked stack
dub checkout --trunk

# Include non-tracked local branches
dub checkout --show-untracked

# Scope to current stack
dub checkout --stack

# Bypass the 30s PR/CI cache
dub checkout --refresh
FlagDescription
--trunkCheckout stack trunk
--show-untrackedInclude non-tracked local branches in picker
--stackRestrict picker to current stack
--refreshBypass the 30s PR/CI overview cache and refetch from GitHub
--no-colorDisable ANSI colors in the picker

Aliases: dub co

Interactive picker

Each row in the picker shows the branch name (colored by stack region) followed by PR number, review status, CI rollup, and last-commit age:

feat/auth-login   #101 · ✔ Approved · CI ✔ · 2h ago
feat/auth-signup  #102 · ✏ Draft    · CI − · 1h ago
feat/auth-tests        2 hours ago

PR metadata is populated from a 30-second on-disk cache at .git/dubstack/overview-cache.json so the picker renders instantly. Pass --refresh to force a fresh gh pr list round-trip.

Branch names are colored by stack region relative to the current branch:

RegionStyle
currentdisabled (current) marker
ancestorcyan (on the parent path)
descendantneutral
sibling-subtreedim
rootbold (the stack trunk)

Keyboard shortcuts

KeyAction
/ Navigate the list
EnterCheckout the highlighted branch
pOpen the highlighted branch's PR in the browser
dRun git diff <parent>...<branch> against the parent and resume the picker
cCopy the branch name to the clipboard (best-effort pbcopy / wl-copy / xclip / clip)
Esc / q / Ctrl-CCancel without switching branches

p, d, and c only fire when the search input is empty so typing branch names containing those letters keeps filtering. After p/d/c the picker re-opens with the same branch highlighted so you can chain actions.

When no clipboard tool is available, c prints (copy unavailable) instead of erroring.

Stack Navigation

# Move one branch upstack
dub up

# Move multiple levels upstack
dub up 2

# Move downstack
dub down
dub down 2

# Jump to tip branch in current path
dub top

# Jump to first branch above root
dub bottom

Orientation Commands

Inspect where the current branch sits in its tracked stack:

dub parent      # Direct parent of current branch
dub children    # Direct children
dub trunk       # Stack root/trunk branch

# With explicit branch argument
dub parent feat/auth-login
dub children feat/auth-types
dub trunk feat/auth-tests

If branch metadata is missing, these commands print a remediation path using dub track.

On this page