- Simplified README.md by moving detailed command docs, workflows, and development info to dedicated user-guide/ and developer-guide/ directories. - Created index.md files for both guides to improve navigation. - Extracted individual command guides (e.g., chat.md, edit.md) into user-guide/ for focused, maintainable documentation. - Moved architecture, configuration, and troubleshooting to developer-guide/. - Updated README links to point to the new docs structure.
2.0 KiB
2.0 KiB
✅ Commit Guide
Grokkit provides two commands to help you generate high-quality, conventional commit messages from your staged changes: commit-msg and commit.
Commit-msg
The commit-msg command generates a conventional commit message based on your currently staged changes (git add). It's perfect for when you want to review the message before using it in your commit.
Usage
git add .
grokkit commit-msg
Output Example:
feat(git): add support for custom commit message templates
Implemented a new system for defining custom templates for commit messages, allowing for project-specific conventions.
Commit
The commit command generates a commit message and commits in one step.
Usage
git add .
grokkit commit # Generate + confirm + commit
Interactive Workflow:
- Grokkit analyzes your staged changes.
- It generates a conventional commit message.
- It shows you the proposed message.
- It asks for confirmation:
Commit with this message? (y/n):. - If you confirm, it runs
git commit -m "<message>".
Why use AI for Commits?
- Conventional Format: Automatically follows the
type(scope): subjectformat. - Accurate Descriptions: Grok analyzes the actual diff to provide a meaningful summary of your changes.
- Consistency: Ensures that all commit messages in your project follow the same high standard.
- Save Time: No more staring at a blank screen trying to remember everything you changed.
Options
| Flag | Description |
|---|---|
--model, -m |
Override the default model (e.g., grok-4) |
Best Practices
- Stage only relevant changes: For the best commit message, only stage the changes that belong in a single commit.
- Review before committing: Always read the generated message to ensure it accurately reflects your intent.
- Model selection: For complex changes, use a more powerful model like
grok-4to get a better summary.