Skip to content

docs(rules): git-hazards #8 — vanished staged file means a coworker committed it - #338

Merged
laurigates merged 1 commit into
mainfrom
docs/git-hazards-coworker-commit
Jul 19, 2026
Merged

docs(rules): git-hazards #8 — vanished staged file means a coworker committed it#338
laurigates merged 1 commit into
mainfrom
docs/git-hazards-coworker-commit

Conversation

@laurigates

Copy link
Copy Markdown
Owner

What

Adds hazard #8 to git-hazards.md (and bumps the header to "Eight traps"): in a shared checkout, a staged file that vanishes — with git status flapping AM across consecutive calls — usually means a coworker session committed it mid-flight, not that pre-commit's stash dance lost it.

Codifies:

  • Discriminator before any recovery: git log --oneline -3 (did HEAD move?) + git log -1 -- <path>
  • Blind-restore downgrade risk: re-adding your own copy can silently revert additions the coworker made before committing — diff against HEAD:<path> first
  • Status flapping as the coworker tell: stop mutating shared state until it settles

Why

Distilled from a live incident this session: the wrong theory was minutes from being acted on, and the restored copy would have downgraded the committed version (it lacked frontmatter the coworker had added).

🤖 Generated with Claude Code

https://claude.ai/code/session_01LpXfWJDmEAgZ29o7Kkj9Ff

…ommitted it

Session-distilled (2026-07): a staged file disappearing from a shared
checkout, with git status flapping A→M across consecutive calls, was
nearly misdiagnosed as pre-commit stash loss. The real cause was a
coworker Claude session committing the file to main mid-flight. Codify
the discriminator (git log -1 -- <path> before any recovery), the
blind-restore downgrade risk, and status-flapping as the coworker tell.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LpXfWJDmEAgZ29o7Kkj9Ff
@github-actions github-actions Bot added documentation Improvements or additions to documentation claude size/s labels Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Broken Links Detected

Summary

Status Count
🔍 Total 170
✅ Successful 160
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 9
❓ Unknown 0
🚫 Errors 1

Errors per input

Errors in exact_dot_claude/docs/prds/daily-catchup.PRD.md


Please fix the broken links before merging.

@laurigates
laurigates merged commit 8634216 into main Jul 19, 2026
7 of 8 checks passed
@laurigates
laurigates deleted the docs/git-hazards-coworker-commit branch July 19, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude documentation Improvements or additions to documentation size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant