Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 16 Oct 14:07
· 12 commits to main since this release

Fold, pop, undo and four more commands, so nothing needs gh stack modify any more

This one is mostly about changing a stack after you've built it. Until now a few of those jobs still sent you to gh stack modify and a manual restack; they're all git-stack commands now, and there's an undo for when one of them does something you didn't expect.

New

  • git stack fold merges the current branch into the one below it, one branch and one PR. --keep keeps the current branch's name and PR instead. Nothing needs restacking.
  • git stack pop takes the current branch out of its stack and deletes it, leaving its changes staged on its parent (like git reset --soft). The branches above are restacked without it.
  • git stack undo reverses the last git-stack command that changed local state; run it again to step further back, up to 20 commands. It covers everything that rewrites branches (create, modify, absorb, restack, reorder, move, fold, pop, untrack, init, sync, a local rename) and never touches GitHub, so a submit or merge clears the history. It's per worktree, so an undo in your checkout won't reverse what an agent did in another one. --list shows what it would put back.
  • git stack create --insert puts a new branch right above the current one instead of only at the top, and restacks the ones above onto it.
  • git stack untrack stops tracking a branch and everything above it without touching the branches; --only takes just that one out and closes the gap.
  • git stack rename renames the current branch, here and on GitHub, keeping its PR attached. --local keeps it to your machine.
  • git stack pr opens the current branch's PR in your browser (or prints the URL when piped).
  • git stack update now shows what's in every release you're skipping, and brings what git stack install set up (aliases, completion, the agent skills) up to date with the new binary.

Fold and pop close the PR they leave behind at your next submit, with a comment pointing at where the work went. Agents get all of these as MCP tools.

Fixes

  • Absorbing a change that deletes lines no longer refuses with "this is a bug in stack_absorb".
  • Stacks are kept in each worktree's own stack file, and submit works from whichever worktree has the stack checked out.
  • Sync no longer restacks a merged branch it decided to keep.

After upgrading

If you set up aliases with git stack install, updating from v0.3.1 adds the new ones (git fold, git pop, git undo and the rest) for you. Anything older, run git stack install once.

What's Changed

New features

Fixes

  • Don't restack a merged branch that sync kept by @DomBlack in #48
  • Put a new stack in the worktree's own stack file by @DomBlack in #49
  • Submit a stack from whichever worktree has it checked out by @DomBlack in #50
  • Fix absorb refusing any change that deletes lines by @DomBlack in #60

Under the hood

Full Changelog: v0.3.1...v0.4.0

Upgrading

git stack update swaps the binary in place, after checking the archive against
checksums.txt. New to git-stack? Start with the install guide.