Commit f8c0b99
fix(state-repo): merge unrelated histories instead of reset to preserve local history
Using git reset --soft discards local commits. Replace with
git merge --allow-unrelated-histories -X ours so both the local
and remote root commits are preserved in the graph. Local files
win on conflict, which is the correct default for a state repo.
INVARIANT: ∀ local ∈ Repos:
¬∃ancestor(local, remote) → merge_unrelated(local, remote, ours)
∧ ∃ancestor(local, remote) → rebase_sync(local, remote)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent c36f412 commit f8c0b99
1 file changed
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
258 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
| |||
0 commit comments