Skip to content

feat: add local merge (ez merge --local) and fold (ez fold) commands#4

Open
dezren39 wants to merge 3 commits into
feat/forkfrom
feat/local-merge
Open

feat: add local merge (ez merge --local) and fold (ez fold) commands#4
dezren39 wants to merge 3 commits into
feat/forkfrom
feat/local-merge

Conversation

@dezren39
Copy link
Copy Markdown
Owner

@dezren39 dezren39 commented Apr 12, 2026

Adds ez merge --local for merging branches without GitHub and ez fold for collapsing branch ranges. Also adds --remote flag to push/submit, fixes cross-fork PR detection, and handles "already exists" errors gracefully.

Changes

Local merge and fold

  • ez merge --local — merge current branch into parent locally
    • --strategy squash (default), --strategy rebase, --strategy merge
    • --into <branch> — merge into a specific branch instead of parent
    • --force — suppress merge-commit warning
  • ez fold <range> — fold a range of branches into one
    • ez fold feat/a..feat/c — squash range, survivor is bottom branch
    • --name — rename surviving branch
  • Reparents child branches and cleans up worktrees on merge/fold
  • Git helpers: merge_squash, merge_no_ff, rename_branch, update_branch_ref

Fork workflow fixes

  • --remote flag on ez push and ez submit — push to a specific git remote, stored per-branch on first use
  • Cross-fork PR detectionget_pr_status_in_repo now retries with fork-prefixed head (e.g. dezren39:feat/config) when the bare branch name returns no PR in a cross-fork repo
  • "Already exists" handling — when gh pr create fails because a PR already exists, ez now parses the PR URL from the error, links it, and continues instead of failing

Commits (3)

  • 8d66501 feat: add local merge (ez merge --local) and fold (ez fold) commands
  • 32f3dce test: add merge/fold CLI parse tests, merge_squash, rename_branch, update_branch_ref git helper tests
  • 1e6facd feat: add --remote flag to push/submit, fix cross-fork PR detection and already-exists handling

Resolves rohoswagger#6

259 tests pass, 0 failures.


Stack (this PR is 5 of 5):

  1. feat/config (rohoswagger#9)
  2. feat/preflight (dezren39#1)
  3. feat/worktree-ops (dezren39#2)
  4. feat/fork (dezren39#3)
  5. → feat/local-merge ← you are here (dezren39#4)

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