Commands
dub trunk
Show or manage configured trunk branches for multi-trunk repos.
Usage
# Show the trunk for the current stack
dub trunk
# Show the trunk for a specific branch
dub trunk feat/auth-login
# Emit trunk info as JSON
dub trunk --jsonFlags
| Flag | Description |
|---|---|
--json | Output trunk info as JSON |
Subcommands
dub trunk list
List every configured trunk, with the default marked.
dub trunk listdub trunk add <name>
Register an additional trunk branch (e.g. a release line).
dub trunk add main
dub trunk add release/24.xdub trunk remove <name>
Unregister a configured trunk.
dub trunk remove release/24.xdub trunk set-default <name>
Set the trunk used for new untracked stacks.
dub trunk set-default main
dub trunk set-default release/24.xNotes
- Multi-trunk repos let DubStack track stacks against multiple long-lived
branches (e.g.
mainplus release lines). Each stack records its trunk in.git/dubstack/state.json. dub trunkwith no subcommand prints the trunk for the inspected branch — defaulting to the current branch — which makes it useful in shell prompts and scripts.
See also: dub sync --all, dub status, dub log.