Skip to content

Support modifying stacks across worktrees - #521

Draft
skarim wants to merge 1 commit into
skarim/worktrees-supportfrom
skarim/worktrees-modify
Draft

skarim wants to merge 1 commit into
skarim/worktrees-supportfrom
skarim/worktrees-modify

Conversation

@skarim

@skarim skarim commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

Builds on #520 to let gh stack modify restructure a stack without first bringing all its branches into one worktree.

  • Support rename, insert, drop, fold, and reorder across worktrees. History changes run where each affected branch is checked out; other worktrees keep their branch selections.
  • Preserve dropped/folded source branches and their worktrees, while removing dropped contributions from the surviving stack, including combined drop/fold operations.
  • Resume conflicts or abort from any worktree. Track action progress and expected branch tips so recovery does not replay completed steps, overwrite intervening work, or discard recovery state after a partial failure.

Only affected worktrees must be clean and available. Existing linear-stack, interactive-UI, and no-mixed-reorder/structural-action constraints remain; no automatic stashing or worktree management is added.

Completes the broader worktree-per-branch workflow discussed in #35 and Discussion #231.

@skarim
skarim added this pull request to stack #522 September 22, 2026 17:03

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant