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
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/cli.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Requires the [GitHub CLI](https://cli.github.com/) (`gh`) v2.0+.
20
20
Initialize a new stack in the current repository.
21
21
22
22
```sh
23
-
gh stack init [branches...] [flags]
23
+
gh stack init [flags] [branches...]
24
24
```
25
25
26
26
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.
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
214
214
Pull from remote and do a cascading rebase across the stack.
215
215
216
216
```sh
217
-
gh stack rebase [branch] [flags]
217
+
gh stack rebase [flags] [branch]
218
218
```
219
219
220
220
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.
346
346
Create a short command alias so you can type less.
347
347
348
348
```sh
349
-
gh stack alias [name] [flags]
349
+
gh stack alias [flags] [name]
350
350
```
351
351
352
352
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`.
0 commit comments