Fix broken git demos/labs in Modules 4, 7, 14 (#2,#3,#4,#12) #55

Merged
claude merged 1 commits from fix/p1-broken-git-demos into main 2026-06-22 14:52:31 -04:00
Contributor

Fixes the flagship broken-lab findings: the prose claimed git behavior the shown commands didn't produce.

  • #2 M4 — commit the reviewed delete before the throwaway, so git restore . returns to a delete-containing checkpoint (was silently wiping the feature).
  • #3 M7 — the 'watch it break' demo now switches to an existing divergent branch, so the would be overwritten by checkout refusal actually fires (git switch -c carried edits over and exited 0).
  • #12 M7 Part C — show worktree isolation with commands that exist at that point; move clear/count to after they're added.
  • #4 M14 — recover with git revert HEAD (Module 12 precedes M14) so CI goes green; remove the incorrect restore/Module-2 attribution.

Dependency chain respected (no reset/revert introduced into M4/M7). All four reproduced and verified in throwaway repos on Git 2.53.0.

Closes #2
Closes #3
Closes #4
Closes #12

🤖 Generated with Claude Code

Fixes the flagship broken-lab findings: the prose claimed git behavior the shown commands didn't produce. - **#2** M4 — commit the reviewed `delete` before the throwaway, so `git restore .` returns to a delete-containing checkpoint (was silently wiping the feature). - **#3** M7 — the 'watch it break' demo now switches to an existing divergent branch, so the *would be overwritten by checkout* refusal actually fires (`git switch -c` carried edits over and exited 0). - **#12** M7 Part C — show worktree isolation with commands that exist at that point; move `clear`/`count` to after they're added. - **#4** M14 — recover with `git revert HEAD` (Module 12 precedes M14) so CI goes green; remove the incorrect `restore`/Module-2 attribution. Dependency chain respected (no reset/revert introduced into M4/M7). All four reproduced and verified in throwaway repos on Git 2.53.0. Closes #2 Closes #3 Closes #4 Closes #12 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude added 1 commit 2026-06-22 14:52:22 -04:00
- M4 Part C now commits the reviewed `delete` change as the checkpoint, so
  Part D's `git restore .` returns to a delete-containing state (was wiping it).
- M7 'watch it break': switch to an existing divergent branch so the
  "would be overwritten by checkout" refusal actually fires (git switch -c never did).
- M7 Part C: demonstrate worktree isolation with existing add/list and distinct
  per-worktree data; move the new clear/count commands to after they exist.
- M14 Part C: recover with `git revert HEAD` (Module 12, which precedes M14) so
  CI legitimately goes green; drop the wrong "Module 2's safety net" attribution.

Closes #2
Closes #3
Closes #4
Closes #12

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TfzV5QvtPDz8LJS3Pu5VLT
claude merged commit e2a53c8259 into main 2026-06-22 14:52:31 -04:00
claude deleted branch fix/p1-broken-git-demos 2026-06-22 14:52:31 -04:00
Sign in to join this conversation.