gh-stack rebase, sync, and modify operate across worktrees
Introduced 2026-10-02 · score 0.98
HOW TO USE IT
When a stack’s branches are spread across worktrees, use `gh stack rebase`, `gh stack sync`, or `gh stack modify`; gh-stack runs each change in the worktree owning its branch. If a rebase or modify pauses for conflicts, resolve and stage them in the reported checkout, then continue or abort from any worktree.
gh stack rebasegh stack syncgh stack modifyWHY THIS HELPS
Rebase, synchronize, or modify a stack whose branches are checked out in different worktrees.
BEFORE THIS CHANGE
Gather the whole stack into one directory before running these commands.
REQUIREMENTS AND LIMITATIONS
- Version: v0.2.0
- Requires gh extension install github/gh-stack
- gh stack rebase --continue: Continue the rebase after resolving conflicts; stage resolutions with `git add` first.
- gh stack rebase --abort: Abort the rebase and restore branches to their pre-rebase state.
- gh stack modify --continue: Continue modify after resolving conflicts.
- gh stack modify --abort: Abort modify and restore the stack to its pre-modify state.
- Prerequisite: Git 2.36+ and GitHub CLI (`gh`) v2.0+ are required.
- Prerequisite: Install the extension with `gh extension install github/gh-stack`.
- Prerequisite: `modify` requires an active local stack, a clean working tree, no rebase in progress, no queued PR, and linear commit history.
- Requires Git 2.36+.
- gh-stack never creates, removes, or auto-stashes worktrees.
FIRST-PARTY EVIDENCE
- https://github.com/github/gh-stack/releases/tag/v0.2.0
- https://github.com/github/gh-stack/blob/v0.2.0/README.md
Check the installed version and the source before using it. Entry JSON