from Hacker News

Show HN: Autocommit – Git hook that pre-writes commit messages

by nephanth on 1/13/25, 8:53 PM with 0 comments

A personal project I made over the holidays.

Makes API calls to Codestral [1] using the diff and some simple RAG to pre-generate the commit messages.

It hooks itself to the git prepare-commit-message hook, so it just populates your commit messages automatically.

It helps get me started writing an actual commit message — even when it hallucinates, I have an easier time correcting a wrong commit message than writing one from scratch.

Would love some feedback, especially on the prompting: It tends to hallucinate, especially if there are relatively few changes.

[1]: https://mistral.ai/fr/news/codestral/