Skip to content

Commit 6620a7b

Browse files
committed
clarify only pushing active branches
1 parent 7961871 commit 6620a7b

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,13 +349,13 @@ gh stack sync --prune
349349

350350
### `gh stack push`
351351

352-
Push all branches in the current stack to the remote.
352+
Push active branches in the current stack to the remote.
353353

354354
```
355355
gh stack push [flags]
356356
```
357357

358-
Pushes every branch in one `git push` using explicit per-branch `--force-with-lease` checks. The update is not atomic: branches whose leases pass may update even if another branch is rejected. Fix the rejected branch and rerun the command; branches already updated will be unchanged. This command does not create or update pull requests — use `gh stack submit` for that.
358+
Pushes every active branch (excluding merged and queued branches) in one `git push` using explicit per-branch `--force-with-lease` checks. The update is not atomic: branches whose leases pass may update even if another branch is rejected. Fix the rejected branch and rerun the command; branches already updated will be unchanged. This command does not create or update pull requests — use `gh stack submit` for that.
359359

360360
| Flag | Description |
361361
|------|-------------|

cmd/push.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ func PushCmd(cfg *config.Config) *cobra.Command {
1919

2020
cmd := &cobra.Command{
2121
Use: "push",
22-
Short: "Push all branches in the current stack to the remote",
23-
Long: `Push all branches in the current stack to the remote.
22+
Short: "Push active branches in the current stack to the remote",
23+
Long: `Push active branches in the current stack to the remote.
2424
2525
Uses explicit per-branch --force-with-lease checks. Updates are not atomic: a
2626
branch may update even if another branch is rejected. Fix the rejected branch
2727
and run the command again; branches already updated will be unchanged.
2828
Merged and queued branches are automatically skipped.`,
29-
Example: ` # Push all stack branches to the default remote
29+
Example: ` # Push active stack branches to the default remote
3030
$ gh stack push
3131
3232
# Push to a specific remote

docs/src/content/docs/reference/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ gh stack rebase --committer-date-is-author-date
398398

399399
### `gh stack push`
400400

401-
Push all branches in the current stack to the remote.
401+
Push active branches in the current stack to the remote.
402402

403403
```sh
404404
gh stack push [flags]
@@ -408,7 +408,7 @@ gh stack push [flags]
408408
|------|-------------|
409409
| `--remote <name>` | Remote to push to (defaults to auto-detected remote) |
410410

411-
Pushes every branch in one `git push` using explicit per-branch `--force-with-lease` checks. The update is not atomic: branches whose leases pass may update even if another branch is rejected. Fix the rejected branch and rerun the command; branches already updated will be unchanged. This command does not create or update pull requests — use `gh stack submit` for that.
411+
Pushes every active branch (excluding merged and queued branches) in one `git push` using explicit per-branch `--force-with-lease` checks. The update is not atomic: branches whose leases pass may update even if another branch is rejected. Fix the rejected branch and rerun the command; branches already updated will be unchanged. This command does not create or update pull requests — use `gh stack submit` for that.
412412

413413
**Examples:**
414414

skills/gh-stack/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ gh stack add -um "Fix auth bug" auth-fix
492492

493493
### Push branches to remote — `gh stack push`
494494

495-
Push all stack branches to the remote.
495+
Push active stack branches to the remote.
496496

497497
```
498498
gh stack push [flags]
@@ -543,6 +543,7 @@ gh stack submit --auto --open
543543
**Behavior:**
544544

545545
- Pushes each active (non-merged, non-queued) branch sequentially with explicit per-branch `--force-with-lease` checks; the overall submit is not atomic
546+
- If a later branch push is rejected, earlier branch pushes and PR updates remain; fix the rejection and rerun the same command
546547
- Creates a new PR for each branch that doesn't have one (base set to the first non-merged ancestor branch)
547548
- After creating PRs, links them together as a **Stack** on GitHub (requires the repository to have stacks enabled)
548549
- If every PR in the stack has already been merged, the stack is complete and can't be extended. `submit` automatically forks your unmerged branches into a **new** stack rooted at the trunk and creates it on GitHub, leaving the merged stack untouched.

0 commit comments

Comments
 (0)