Elektrine lite

← Feed

@ramsey@phpc.social

Post #3969560

2026-07-20 20:59 UTC

I was running Claude at work last week when it reported it couldn’t make commits, so I asked what happened, and it explained that it needed a Git repository to make commits. “You’ve been working in a Git repository. What happened?” I asked. It argued back that the directory was not a Git repository; it was missing the `.git/` directory. Sure enough, it was. So, I asked what happened. “I deleted the .git/ directory, and now that I think about it, that was the wrong thing to do. I’m sorry.”

Replies (8)

  • @ilia@phpc.social 2026-07-20 21:08

    @ramsey@phpc.social I wonder what process/prompt lead it to delete .git/ dir

    Open ##3969752

  • @kboyd@phpc.social 2026-07-20 21:27

    @ramsey@phpc.social Amazing. No notes.

    Open ##3970180

  • @TheCodeLorax@tech.lgbt 2026-07-20 21:15

    @ramsey@phpc.social We all laugh and make fun of Claude for that, but many of us (myself included) have done the same at one point or another.

    Open ##3970461

  • @ramsey@phpc.social pro tip: if you have /path/repos/reponame on the host, run claude inside a docker and mount /path/repos ro, /path/repos/reponame rw and /path/repos/reponame/.git ro. Now it can mess with the working copy and not fuck up the git history. It will try to do things it shouldn't but it won't be able to. Worst case is that it can lose the working copy. It won't be able to commit, but it won't set fire to the work history either. I am continually astounded that this tech can be simultaneously so terrible and useful at the same time.

    Open ##3970469

  • @jrf_nl@phpc.social 2026-07-20 22:53

    @ramsey@phpc.social _sigh_ and this is why AI is a waste of time.

    Open ##3971762

  • @NovaNaturalist@cosocial.ca 2026-07-21 01:07

    @ramsey@phpc.social your mistake was in the first 6 words. The rest is inevitable.

    Open ##3974119

  • @dirtside@phpc.social 2026-07-21 01:44

    @ramsey@phpc.social "I was running Claude at work" i think i see the problem

    Open ##3974602

  • @bobmagicii@phpc.social 2026-07-21 14:54

    @ramsey@phpc.social everyone else is already giving you the burn so instead consider: imagine if claude is even lying about having deleted the git folder. with all the trained reinforcement it has about deleting things, it just assumed that if something is missing, "i did it". and its actually missing because of a fat fingered keyboard combo. fun fact, i am the reason vscode has a popup when you accidentally drag drop a folder into another. during beta i assaulted their inbox until it they yielded.

    Open ##3988481