Skip to content

Support local merge / stack collapse without GitHub #6

Description

@dezren39

Problem

ez merge only works through the GitHub API — it requires PRs to exist and merges them remotely. There is no way to:

  • Locally merge a branch into its parent (like git merge --squash)
  • Collapse a stack segment locally (merge multiple branches into one)
  • Clean up finished branches from the stack without going through GitHub

This is limiting for local-only workflows, offline work, or when users want to squash a chain before pushing.

Current behavior

  • ez merge calls GitHub's merge API; fails without a PR
  • No local merge, squash, or fold operation
  • Deleting a branch from the stack requires manual cleanup of stack.json

Proposed solution

  1. ez merge --local — merge current branch into its parent locally (default: squash)
    • --strategy merge|squash|rebase to control merge method
    • Updates stack metadata: reparents children to the merged-into parent
    • Deletes the merged branch
  2. ez fold (or ez collapse) — merge a contiguous range of branches into one
    • ez fold feat/a..feat/c squashes the range into a single branch
  3. ez delete <branch> — remove a branch from the stack and reparent children
    • With --force to also delete the git branch

Use cases

  • Local development before pushing anything
  • Cleaning up experimental branches
  • Squashing a chain of small fixup branches into one coherent change
  • Offline workflows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions