status
v0.1.0+Display the current stack as a tree view showing branch relationships, sync state, and PR status.
rung statusrung status --fetch # Fetch from remote first for fresh divergence inforung status --jsonAliases
Section titled “Aliases”rung st— shorthand forrung status
Example Output
Section titled “Example Output”$ rung status
Stack ────────────────────────────────────────────────── ● feat-add-user-model #41 ← main ● ▶ feat-add-user-api #42 ← feat-add-user-model ● feat-add-user-tests #43 ← feat-add-user-api ──────────────────────────────────────────────────
● synced ● needs sync ● conflictLegend
Section titled “Legend”| Symbol | Meaning |
|---|---|
▶ | Current branch (appears before branch name) |
● | Green: synced, Yellow: needs sync, Red: conflict |
#N | PR number |
← | Shows parent branch |
Remote Divergence Indicators
Section titled “Remote Divergence Indicators”The status display shows how local branches compare to their remote counterparts:
| Indicator | Meaning |
|---|---|
(2↑) | Branch is 2 commits ahead of remote (safe to push) |
(1↓) | Branch is 1 commit behind remote (remote has changes) |
(2↑ 1↓) | Branch has diverged (2 ahead, 1 behind) |
When branches have diverged, a warning is shown with guidance to use rung submit --force (which uses --force-with-lease for safety).
JSON Output
Section titled “JSON Output”For integration with other tools:
$ rung status --json{ "branches": [ { "name": "feat-add-user-model", "parent": "main", "state": "synced", "pr": 41, "is_current": false }, { "name": "feat-add-user-api", "parent": "feat-add-user-model", "state": { "diverged": { "commits_behind": 2 } }, "pr": 42, "is_current": true } ], "current": "feat-add-user-api"}Branch States
Section titled “Branch States”| State | Description |
|---|---|
synced | Up-to-date with parent branch |
diverged | Parent has moved, needs rebase |
conflict | Rebase resulted in conflicts |
detached | Orphaned (parent deleted) |
Options
Section titled “Options”| Option | Description |
|---|---|
--fetch | Run git fetch before showing status to get fresh remote divergence info |
--json | Output as JSON for tooling integration |
- PR numbers are stored locally in
.git/rung/stack.json - Use
--jsonfor CI/CD integration and scripting - The
is_currentfield is only included whentrue - Remote divergence indicators are based on cached data; use
--fetchfor current state