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 d115ca0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,9 @@ Initialize a new stack in the current repository.
76
76
gh stack init [flags] [branches...]
77
77
```
78
78
79
-
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. In interactive mode, you'll also be prompted to set an optional branch prefix (unless adopting existing branches). When a prefix is set, branch names you enter are automatically prefixed. When explicit branch names are given, creates any that don't already exist (branching from the trunk). The trunk defaults to the repository's default branch unless overridden with `--base`.
79
+
Initializes a new stack locally. In interactive mode (no arguments), prompts for a branch name and offers to use the current branch as the first layer. If a branch name contains slashes (e.g., `feat/api`), prompts if you would like to use a prefix (e.g., `feat/`) for all branches in the stack.
80
+
81
+
When explicit branch names are given, existing branches are adopted automatically and any missing branches are created. The trunk defaults to the repository's default branch unless overridden with `--base`.
80
82
81
83
Use `--numbered` with `--prefix` to enable auto-incrementing numbered branch names (`prefix/01`, `prefix/02`, …). Without `--numbered`, you'll always be prompted to provide a meaningful branch name.
82
84
@@ -85,7 +87,6 @@ Enables `git rerere` automatically so that conflict resolutions are remembered a
85
87
| Flag | Description |
86
88
|------|-------------|
87
89
|`-b, --base <branch>`| Trunk branch for the stack (defaults to the repository's default branch) |
88
-
|`-a, --adopt`| Adopt existing branches into a stack instead of creating new ones |
89
90
|`-p, --prefix <string>`| Set a branch name prefix for the stack |
90
91
|`-n, --numbered`| Use auto-incrementing numbered branch names (requires `--prefix`) |
0 commit comments