submit
v0.1.0+Push all stack branches and create or update pull requests on GitHub. Each PR includes a stack comment showing the branch hierarchy.
rung submitrung submit --draftrung submit --forcerung submit --title "Custom title"rung submit --amendrung submit -m "commit message"rung submit --dry-runAliases
Section titled “Aliases”rung sm— shorthand forrung submit
Options
Section titled “Options”| Option | Description |
|---|---|
--draft | Create PRs as drafts |
--force | Force push even if lease check fails |
-t, --title <title> | Custom PR title for current branch (overrides commit message) |
--amend | Amend uncommitted changes to the current commit before push (v0.8.0+) |
-m, --message <message> | Create a new commit with the given message before push (v0.8.0+) |
--dry-run | Preview what would happen without pushing or creating PRs |
Example
Section titled “Example”$ rung submit
✓ Pushed feat-add-user-model✓ Created PR #41: feat: add user model https://github.com/org/repo/pull/41
✓ Pushed feat-add-user-api✓ Created PR #42: feat: add user API (base: feat-add-user-model) https://github.com/org/repo/pull/42
✓ Pushed feat-add-user-tests✓ Created PR #43: feat: add user tests (base: feat-add-user-api) https://github.com/org/repo/pull/43What Submit Does
Section titled “What Submit Does”For each branch in the stack:
- Push — Pushes the branch with
--force-with-lease(safe force push) - Create PR — If no PR exists, creates one via GitHub API
- Update PR — If PR exists, updates the description with stack navigation
- Stack Comment — Adds/updates a comment showing the PR hierarchy
Stack Comments
Section titled “Stack Comments”When you submit, rung adds a comment to each PR showing where it fits in the stack:
- **#43** 👈- **#42**- **#41**- `main`
---
_Managed by [rung](https://github.com/auswm85/rung)_The 👈 indicates the current PR in the stack.
PR Titles
Section titled “PR Titles”By default, rung uses the first commit message as the PR title. You can override this:
# Set custom title for current branchrung submit --title "Add user authentication system"If you created branches with rung create -m "message", that message becomes the PR title.
Draft PRs
Section titled “Draft PRs”Create PRs as drafts to avoid triggering CI or notifying reviewers:
rung submit --draftForce Push
Section titled “Force Push”If the remote branch has diverged (e.g., someone else pushed), use --force:
rung submit --forceHandling Uncommitted Changes
Section titled “Handling Uncommitted Changes”Added in v0.8.0
If you have uncommitted changes (staged or unstaged), rung will prompt you with options:
$ rung submit
? You have uncommitted changes. What would you like to do?> Amend to current commit Create new commit Skip (push without committing)You can skip the prompt with flags:
# Amend changes to current commitrung submit --amend
# Create new commit with messagerung submit -m "fix: address review comments"Dry Run
Section titled “Dry Run”Preview what would happen:
$ rung submit --dry-run
Would push: feat-add-user-model → origin/feat-add-user-model feat-add-user-api → origin/feat-add-user-api
Would create PRs: feat-add-user-model: "feat: add user model" (base: main) feat-add-user-api: "feat: add user API" (base: feat-add-user-model)JSON Output
Section titled “JSON Output”$ rung submit --json{ "submitted": [ { "branch": "feat-add-user-model", "pushed": true, "pr": { "number": 41, "url": "https://github.com/org/repo/pull/41", "created": true } }, { "branch": "feat-add-user-api", "pushed": true, "pr": { "number": 42, "url": "https://github.com/org/repo/pull/42", "created": false } } ]}- Branches are pushed with
--force-with-leaseby default (safe force push) - PRs have the correct base branch (parent in the stack)
- Stack comments are automatically updated when the stack changes
- You need GitHub authentication (via
ghCLI orGITHUB_TOKEN)