logoalt Hacker News

mh-yesterday at 8:03 AM1 replyview on HN

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


Replies

MrGreenTeayesterday at 11:56 AM

I use it (with jj but should be the same with git). It tells Claude to commit after every Write tool use. It's a bit to small steps but I then usually just squash them afterwards. I haven't yet found a good automatic heuristic for when to tell Claude to commit (or directly auto-commit, but I like that Claude writes the commit message)