Skip to content

Commit b1eb040

Browse files
committed
fix order of flags and args in cli reference
1 parent 55533a7 commit b1eb040

File tree

1 file changed

+5
-5
lines changed
  • docs/src/content/docs/reference

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Requires the [GitHub CLI](https://cli.github.com/) (`gh`) v2.0+.
2020
Initialize a new stack in the current repository.
2121

2222
```sh
23-
gh stack init [branches...] [flags]
23+
gh stack init [flags] [branches...]
2424
```
2525

2626
Creates an entry in `.git/gh-stack` to track stack state. In interactive mode (no arguments), prompts you to name branches and offers to use the current branch as the first layer. You'll also be prompted to set an optional branch prefix. When a prefix is set, branch names you enter are automatically prefixed.
@@ -67,7 +67,7 @@ gh stack init -p feat --numbered
6767
Add a new branch on top of the current stack.
6868

6969
```sh
70-
gh stack add [branch] [flags]
70+
gh stack add [flags] [branch]
7171
```
7272

7373
Creates a new branch at the current HEAD, adds it to the top of the stack, and checks it out. Must be run while on the topmost branch of a stack. If no branch name is given, prompts for one.
@@ -214,7 +214,7 @@ gh stack sync
214214
Pull from remote and do a cascading rebase across the stack.
215215

216216
```sh
217-
gh stack rebase [branch] [flags]
217+
gh stack rebase [flags] [branch]
218218
```
219219

220220
Fetches the latest changes from `origin`, then ensures each branch in the stack has the tip of the previous layer in its commit history. Rebases branches in order from trunk upward.
@@ -346,7 +346,7 @@ Checks out the branch closest to the trunk.
346346
Create a short command alias so you can type less.
347347

348348
```sh
349-
gh stack alias [name] [flags]
349+
gh stack alias [flags] [name]
350350
```
351351

352352
Installs a small wrapper script into `~/.local/bin/` that forwards all arguments to `gh stack`. The default alias name is `gs`, but you can choose any name by passing it as an argument. After setup, you can run `gs push` instead of `gh stack push`.
@@ -369,7 +369,7 @@ gh stack alias gst
369369

370370
# Remove an alias
371371
gh stack alias --remove
372-
gh stack alias gst --remove
372+
gh stack alias --remove gst
373373
```
374374

375375
### `gh stack feedback`

0 commit comments

Comments
 (0)