Skip to content

Commit 5b307cd

Browse files
committed
update docs with new rebase flag
1 parent 73ea782 commit 5b307cd

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ If a rebase conflict occurs, the operation pauses and prints the conflicted file
209209
|------|-------------|
210210
| `--downstack` | Only rebase branches from trunk to the current branch |
211211
| `--upstack` | Only rebase branches from the current branch to the top |
212+
| `--no-trunk` | Skip trunk — only rebase stack branches onto each other (no fetch, no trunk rebase) |
212213
| `--continue` | Continue the rebase after resolving conflicts |
213214
| `--abort` | Abort the rebase and restore all branches to their pre-rebase state |
214215
| `--remote <name>` | Remote to fetch from (defaults to auto-detected remote) |
@@ -230,6 +231,9 @@ gh stack rebase --downstack
230231
# Only rebase branches above the current one
231232
gh stack rebase --upstack
232233

234+
# Rebase stack branches without pulling from or rebasing with trunk
235+
gh stack rebase --no-trunk
236+
233237
# After resolving a conflict
234238
gh stack rebase --continue
235239

docs/src/content/docs/guides/workflows.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ gh stack rebase --downstack
155155

156156
# Only rebase from the current branch up to the top
157157
gh stack rebase --upstack
158+
159+
# Rebase stack branches without pulling from or rebasing with trunk
160+
gh stack rebase --no-trunk
158161
```
159162

160163
After rebasing, push the updated branches:

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ If a rebase conflict occurs, the operation pauses and prints the conflicted file
334334
|------|-------------|
335335
| `--downstack` | Only rebase branches from trunk to the current branch |
336336
| `--upstack` | Only rebase branches from the current branch to the top |
337+
| `--no-trunk` | Skip trunk — only rebase stack branches onto each other (no fetch, no trunk rebase) |
337338
| `--continue` | Continue the rebase after resolving conflicts |
338339
| `--abort` | Abort the rebase and restore all branches to their pre-rebase state |
339340
| `--remote <name>` | Remote to fetch from (defaults to auto-detected remote) |
@@ -355,6 +356,9 @@ gh stack rebase --downstack
355356
# Only rebase branches above the current one
356357
gh stack rebase --upstack
357358

359+
# Rebase stack branches without pulling from or rebasing with trunk
360+
gh stack rebase --no-trunk
361+
358362
# After resolving a conflict
359363
gh stack rebase --continue
360364

skills/gh-stack/SKILL.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: >
77
branch chains, or incremental code review workflows.
88
metadata:
99
author: github
10-
version: "0.0.5"
10+
version: "0.0.6"
1111
---
1212

1313
# gh-stack
@@ -155,6 +155,7 @@ Small, incidental fixes (e.g., fixing a typo you noticed) can go in the current
155155
| Sync and prune merged branches | `gh stack sync --prune` |
156156
| Rebase entire stack | `gh stack rebase` |
157157
| Rebase upstack only | `gh stack rebase --upstack` |
158+
| Rebase without trunk | `gh stack rebase --no-trunk` |
158159
| Continue after conflict | `gh stack rebase --continue` |
159160
| Abort rebase | `gh stack rebase --abort` |
160161
| View stack details (JSON) | `gh stack view --json` |
@@ -663,6 +664,9 @@ gh stack rebase --downstack
663664
# Rebase only branches from current branch to top
664665
gh stack rebase --upstack
665666

667+
# Rebase stack branches without pulling from or rebasing with trunk
668+
gh stack rebase --no-trunk
669+
666670
# After resolving a conflict: stage files with `git add`, then:
667671
gh stack rebase --continue
668672

@@ -674,6 +678,7 @@ gh stack rebase --abort
674678
|------|-------------|
675679
| `--downstack` | Only rebase branches from trunk to the current branch |
676680
| `--upstack` | Only rebase branches from the current branch to the top |
681+
| `--no-trunk` | Skip trunk — only rebase stack branches onto each other (no fetch, no trunk rebase) |
677682
| `--continue` | Continue after resolving conflicts |
678683
| `--abort` | Abort and restore all branches |
679684
| `--remote <name>` | Remote to fetch from (use if multiple remotes exist) |
@@ -688,6 +693,8 @@ gh stack rebase --abort
688693

689694
**Rerere (conflict memory):** `git rerere` is enabled by `init` so previously resolved conflicts are auto-resolved in future rebases.
690695

696+
**No-trunk mode:** Use `--no-trunk` to skip fetching from the remote and rebasing with the trunk branch. Only inter-branch rebases are performed (branch 2 onto branch 1, branch 3 onto branch 2, etc.). Useful when you only need to align stack branches with each other without pulling upstream changes.
697+
691698
---
692699

693700
### View the stack — `gh stack view`

0 commit comments

Comments
 (0)