coily git pull --rebase drops local commits on force-pushed upstream #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-22T20:43:39Z - https://github.com/coilysiren/coily/issues/326
coily git pull --rebasesilently dropped a local commit twice in one session, in two different repos (agentic-os, agentic-os-kai).Both times the upstream
mainhad been force-pushed (release-please rewriting history). Git's default--fork-pointheuristic for rebase, when the upstream ref's reflog shows a rewrite, can decide a local commit is "already upstream" and drop it. The local commit became dangling - no error, no conflict, just gone fromHEADand the working tree. Recovered by hand via reflog each time.Proposed fix:
coily git pullshould pass--no-fork-pointwhen--rebaseis in play, or detect a force-updated upstream and refuse to rebase without an explicit flag. Silent commit loss is the worst possible failure mode for a git wrapper.