Skip to content

status

v0.1.0+

Display the current stack as a tree view showing branch relationships, sync state, and PR status.

Terminal window
rung status
rung status --fetch # Fetch from remote first for fresh divergence info
rung status --json
  • rung st — shorthand for rung status
Terminal window
$ 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 conflict
SymbolMeaning
Current branch (appears before branch name)
Green: synced, Yellow: needs sync, Red: conflict
#NPR number
Shows parent branch

The status display shows how local branches compare to their remote counterparts:

IndicatorMeaning
(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).

For integration with other tools:

Terminal window
$ 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"
}
StateDescription
syncedUp-to-date with parent branch
divergedParent has moved, needs rebase
conflictRebase resulted in conflicts
detachedOrphaned (parent deleted)
OptionDescription
--fetchRun git fetch before showing status to get fresh remote divergence info
--jsonOutput as JSON for tooling integration
  • PR numbers are stored locally in .git/rung/stack.json
  • Use --json for CI/CD integration and scripting
  • The is_current field is only included when true
  • Remote divergence indicators are based on cached data; use --fetch for current state
  • sync — Rebase diverged branches
  • submit — Push and update PRs
  • doctor — Diagnose issues