A git prepare-commit-msg hook for authoring commit messages with GPT-3. With this tool, you can easily generate clear, comprehensive and descriptive commit messages letting you focus on writing code. To use gptcommit, simply run git commit as you normally would. The hook will automatically generate a commit message for you using a large language model like GPT. If you're not satisfied with the generated message, you can always edit it before committing. By default, gptcommit uses the GPT-3 model. Please ensure you have sufficient credits in your OpenAI account to use it. Commit messages are a key channel for developers to communicate their work with others, especially in code reviews. When making complex code changes, it can be tedious to thoroughly document the contents of each change. I often felt the impulse to just title my commit “fix bug” and move on. Surfacing these changes with gptcommit helps the author and reviewer by bringing attention to these additional changes.
Features
- gptcommit supports a number of configuration options
- Set your OpenAI API key
- Try out a different OpenAI model
- Set summarizing language
- Allow re-summarizing when amending commits
- gptcommit uses English by default