Skip to content

Recover from rebases the Stop hook leaves behind - #13

Merged
bguidolim merged 1 commit into
mainfrom
bruno/stuck-rebase-recovery
Oct 30, 2026
Merged

bguidolim merged 1 commit into
mainfrom
bruno/stuck-rebase-recovery

Conversation

@bguidolim

Copy link
Copy Markdown
Contributor

Why

A teammate's memory edits were stuck for two days. The Stop hook's pull --rebase failed partway on a blobless clone (git's commit-graph blocked a lazy fetch), left the rebase behind, and that paused every later Stop. Following /resolve-memories literally (--abort) would have wiped the pending edits.

The hook now rolls back a rebase its own pull leaves, and says to run mcs sync when the commit-graph is the cause. Sync turns the commit-graph off for each checkout, and mcs doctor warns when it's on, or when auto-push is stuck on a rebase, a missing upstream or a misnamed file. /resolve-memories clears a rebase that can't be finished with --quit, keeping edits made since it started.

Test plan

  • Run mcs sync on an existing checkout → git -C .claude/.memories-repo config core.commitGraph prints false
  • Unset it and run mcs doctor → commit-graph warning
  • Leave a rebase in progress in the checkout and run mcs doctor → warning naming /resolve-memories

- Roll back a pull that fails mid-rebase without a conflict, and name `mcs sync` when the commit-graph caused it
- Turn off core.commitGraph per clone on every sync; doctor warns when it's on or auto-push is stuck
- /resolve-memories clears an unfinishable rebase with --quit, keeping edits made since it started
@bguidolim
bguidolim added this pull request to stack #14 October 29, 2026 14:04
@bguidolim
bguidolim merged commit 5c42c7b into main Oct 30, 2026
8 checks passed
@bguidolim
bguidolim deleted the bruno/stuck-rebase-recovery branch October 30, 2026 00:23
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