gh-stack init adopts multiple branches and derives their prefix
Introduced 2026-05-15 · score 0.90
HOW TO USE IT
When initializing a stack from multiple existing branches, run `gh stack init <branch1> <branch2> ...`; existing branches are adopted automatically and v0.0.4 derives the prefix from their names.
gh stack init <branch1> <branch2>WHY THIS HELPS
Initialize a stack from multiple existing branches with a shared prefix.
REQUIREMENTS AND LIMITATIONS
- Version: v0.0.4
- branches... (required): One or more branch names, processed in order; existing branches are adopted automatically. For this task, supply multiple names.
- --adopt: Deprecated, hidden, but still accepted; existing branches no longer require it to be adopted.
- Prerequisite: Install the extension with `gh extension install github/gh-stack`; the README says GitHub CLI (`gh`) must be installed first.
- The `--adopt` flag is deprecated and hidden but still accepted.
- Docs conflict: Later official docs say automatic prefix detection was removed; branch names with slashes are taken literally. That behavior is newer than v0.0.4 and does not apply to this card's version: https://github.com/github/gh-stack/releases.
FIRST-PARTY EVIDENCE
- https://github.com/github/gh-stack/releases/tag/v0.0.4
- https://github.com/github/gh-stack/blob/v0.0.4/README.md
Check the installed version and the source before using it. Entry JSON