Skip to content

Commit 2821962

Browse files
committed
alias delete
1 parent e0495d5 commit 2821962

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
@@ -326,13 +326,13 @@ gh stack view --json
326326

327327
### `gh stack unstack`
328328

329-
Remove a stack from local tracking and delete it on GitHub.
329+
Remove a stack from local tracking and delete it on GitHub. Also available as `gh stack delete`.
330330

331331
```
332332
gh stack unstack [branch] [flags]
333333
```
334334

335-
If no branch is specified, uses the current branch to find the stack. By default, the stack is removed from both local tracking and GitHub. Use `--local` to only remove the local tracking entry.
335+
If no branch is specified, uses the current branch to find the stack. Deletes the stack on GitHub first, then removes local tracking. Use `--local` to only remove the local tracking entry.
336336

337337
| Flag | Description |
338338
|------|-------------|

cmd/unstack.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ func UnstackCmd(cfg *config.Config) *cobra.Command {
1818
opts := &unstackOptions{}
1919

2020
cmd := &cobra.Command{
21-
Use: "unstack [branch]",
22-
Short: "Delete a stack locally and on GitHub",
23-
Long: "Remove a stack from local tracking and delete it on GitHub. Use --local to only remove local tracking.",
24-
Args: cobra.MaximumNArgs(1),
21+
Use: "unstack [branch]",
22+
Aliases: []string{"delete"},
23+
Short: "Delete a stack locally and on GitHub",
24+
Long: "Remove a stack from local tracking and delete it on GitHub. Use --local to only remove local tracking.",
25+
Args: cobra.MaximumNArgs(1),
2526
RunE: func(cmd *cobra.Command, args []string) error {
2627
if len(args) > 0 {
2728
opts.target = args[0]

docs/src/content/docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ gh stack init --adopt branch-2 branch-1 branch-3
4848

4949
### How do I delete my stack?
5050

51-
**From the CLI** — Run `gh stack unstack` to delete the stack on GitHub and remove local tracking. Use `--local` to only remove local tracking.
51+
**From the CLI** — Run `gh stack unstack` (or `gh stack delete`) to delete the stack on GitHub and remove local tracking. Use `--local` to only remove local tracking.
5252

5353
**From the UI** — You can unstack PRs from the GitHub UI — see [Unstacking](/gh-stack/guides/ui/#unstacking) for a walkthrough. This dissolves the association between PRs, turning them back into standard independent PRs.
5454

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ gh stack push --remote upstream
277277

278278
### `gh stack unstack`
279279

280-
Remove a stack from local tracking and delete it on GitHub.
280+
Remove a stack from local tracking and delete it on GitHub. Also available as `gh stack delete`.
281281

282282
```sh
283283
gh stack unstack [flags] [branch]

0 commit comments

Comments
 (0)