You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 83dbac2
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -575,7 +575,7 @@ Provide a stack number (the identifier shown in the github.com stack UI) to unst
575
575
576
576
Use `--local` to only remove local tracking without contacting GitHub.
577
577
578
-
GitHub decides which pull requests can be unstacked: PRs that are queued for merge or have auto-merge enabled are left stacked. When some pull requests remain stacked, the stack is kept (and local tracking, if any, is unchanged).
578
+
PRs that are merged, merging, or queued for merge cannot be removed from a stack on GitHub. After a successful unstack, local tracking is removed even when some PRs remain on GitHub.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/cli.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -306,7 +306,7 @@ With no argument, the command targets the active stack — the one that contains
306
306
307
307
Provide a stack number (the identifier shown in the github.com stack UI) to unstack a specific stack on GitHub. This works from anywhere in the repository, whether or not the stack is checked out locally — the stack is unstacked directly through the GitHub API. When the stack is also available locally, its local tracking is removed as well.
308
308
309
-
PRs that are merged, merging, or queued for merge cannot be removed from a stack on GitHub and are left part of the stack. When every pull request is removed, the stack is dissolved and any local tracking is removed; when some pull requests remain stacked, the stack is kept and local tracking, if any, is unchanged. Use `--local` to skip the remote operation and only remove local tracking.
309
+
PRs that are merged, merging, or queued for merge cannot be removed from a stack on GitHub. After a successful unstack, local tracking is removed even when some PRs remain on GitHub. Use `--local` to skip the remote operation and only remove local tracking.
310
310
311
311
This is useful when you need to restructure a stack — remove a branch, insert a branch, reorder branches, rename branches, or make other large changes. After unstacking, use `gh stack init` to re-create the stack with the desired structure — existing branches are adopted automatically.
POST /repos/{owner}/{repo}/stacks/{stack_number}/unstack
164
164
```
165
165
166
-
Removes the unmerged pull requests from a stack. This endpoint takes no request body. Pull requests that cannot be unstacked (those merged, merging, or queued for merge) are left in place.
166
+
Removes eligible pull requests from a stack. This endpoint takes no request body. Merged or queued pull requests are left in place.
167
167
168
168
- When pull requests remain in the stack, the updated stack is returned with `200 OK`.
169
169
- When no pull requests remain, the stack is dissolved and `204 No Content` is returned.
@@ -174,7 +174,7 @@ gh api --method POST repos/OWNER/REPO/stacks/42/unstack
174
174
175
175
### The stack resource
176
176
177
-
Each stack is represented by the following resource. The get, create, and add endpoints return a single stack; the list endpoint returns an array of them; and unstack returns the remaining merged stack, or `204 No Content` when the stack is dissolved.
177
+
Each stack is represented by the following resource. The get, create, and add endpoints return a single stack; the list endpoint returns an array of them; and unstack returns the remaining stack, or `204 No Content` when the stack is dissolved.
0 commit comments