top | item 42689107

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

2 points| nephanth | 1 year ago |github.com

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/

discuss

order

No comments yet.