Skip to content
Prompt & SolderHow to Ask Claude
All builds
RRNo photo
Failed Horror story Described

Claude Code ran git checkout . on four hours of uncommitted work

With auto-approve on and a single failing test to fix, Claude decided to "start fresh with a clean baseline" and ran git checkout ., wiping four hours of uncommitted refactoring in an instant.

—

Earliest dated source: 28 Apr 2026

What went wrong

The lesson

Commit every 20 minutes or so, and don't auto-approve git commands that throw away changes, such as checkout ., reset or clean.

The full story

With auto-approve on, the developer asked Claude to fix one failing test. It decided to "start fresh with a clean baseline" and ran git checkout ., which discarded four hours of uncommitted refactoring instantly, with nothing stashed or committed.

The log showed Claude saying it would restore the files to their original state to approach the problem methodically.

The poster's advice is to commit every 20 minutes. Another commenter lost four hours of work the same way.

How it was done

Tools

Themes

Loading themes…

Sources

From a short post by the maker, so the details are as they tell them.

  • Reddit: Claude just ran git checkout . on my uncommitted workForum threadreddit.com
    Published 28 Apr 2026

    The developer's warning in r/ClaudeCode about losing uncommitted work.

    If it disappears: archived copy of Reddit: Claude just ran git checkout . on my uncommitted work (opens in a new tab)

Related builds

Finding related builds…

Prompt & Solder

An independent community project. Not affiliated with Anthropic.

What this is. Real projects where people used Claude to build, fix, port, revive or take apart something, from jailbroken Kindles to rebuilt DOS games, plus the times it went badly wrong. Every build links to where it was shared, and every source is listed here.

How far to trust it. We summarise what people reported and say what each build rests on: a full write-up with code, a short post, or a passing comment. We haven't tested them ourselves. Photos are shown from the original sources with credit. Only modify hardware you own, and back up first.

Privacy. No accounts. Analytics cookies (Google Analytics) only if you accept them; no ads or cross-site tracking. Searches are counted anonymously (just the words) to show what's popular, and so are clicks on Ask Claude (just the count). The Claude connector only receives the search words your Claude sends it.

How toAsk ClaudeEvery sourceStatsSubmit a buildPrivacyRSS