logoalt Hacker News

qaboutthatyesterday at 6:07 AM2 repliesview on HN

If I tell Claude to "revert that last change, it isn't right, try this instead" and Claude hasn't committed recently it will happily `git checkout ...` and blow away all recent changes instead of reverting the "last change".

(Which, it's not wrong or anything -- I did say "revert that change" -- it's just annoying. And telling `CLAUDE.md` to commit more often doesn't work consistently, because Claude is a dummy sometimes).


Replies

mh-yesterday at 8:03 AM

I haven't tried it, but theoretically one could use Claude Code's hooks facility to enforce committing at some determined thresholds.

show 1 reply
mmmatttyesterday at 4:10 PM

[dead]