Generate concise, relevant commit messages for your Git repositories using local AI models with Ollama. Streamline your workflow and let AI handle the first draft of your commit messages!
Up and running in minutes
The installation process automatically sets up a global Git alias: git aic
which executes git-ai-commit
.
Make sure Git is installed on your system. Download Git
Version 16 or higher recommended. Download Node.js
Needs to be installed and running. Download Ollama
Important: Make sure the Ollama server is running before using git-ai-commit
. You can typically start it by running ollama serve
in your terminal.
Ensure you have pulled at least one model (e.g., ollama pull llama3:8b
).
Start generating AI-powered commit messages
Make your code changes and stage them using git add
.
Run the git aic
command.
The tool will connect to your running Ollama instance, analyze the staged diff, and generate a commit message.
Generating commit message...
Generated commit message:
? Do you want to use this commit message? (Y/n)
Discover what makes Git AI Commit a powerful tool for your development workflow
Leverages local LLMs through Ollama for intelligent message generation based on your code changes.
Keep your code private. No data is sent to external servers (besides your local Ollama instance).
Integrates seamlessly with your Git process via a handy alias (git aic
).
Choose your preferred Ollama model, set timeouts, customize prompts, and decide whether to auto-accept suggestions.
Installs a convenient git aic
alias during setup for quick access.
Review and confirm the generated message before committing (configurable).
Tailor to fit your workflow
You can customize git-ai-commit
's behavior using the config
command:
Common issues and their solutions
Make sure you have installed Ollama correctly. See Prerequisites.
Start the Ollama server, usually by running ollama serve
in your terminal.
llama3:8b
instead of llama3:70b
).git-ai-commit config
.This might happen if Ollama isn't running or accessible when you run git-ai-commit config
. You can still manually type the name of a model you know you have installed.
Start using Git AI Commit today and let AI create better commit messages!