Use AI to transform your messy commit history into clean, logical commits that reviewers will love
Ever spent 30 minutes reorganizing commits before a PR? We've all been there. Git Smart Squash uses AI to automatically organize your changes into logical, well-structured commits in seconds.
Before (your typical feature branch):
After (AI-organized commits):
The AI analyzes your entire diff and groups related changes together, creating clean commit messages that follow conventional commit standards.
Option A: Local AI (Free & Private) - Default for Privacy
Option B: Cloud AI (if you have API keys)
That's it! Your commits are now beautifully organized.
Don't worry - Git Smart Squash is designed to be safe:
- Dry run by default - always shows you the plan first
- Always creates a backup branch before making changes
- Never pushes automatically - you stay in control
- Easy recovery - your original commits are always saved
Ollama (default) | Free | 100% Local | ollama pull devstral |
OpenAI | ~$0.01/use | Cloud | Set OPENAI_API_KEY |
Anthropic | ~$0.01/use | Cloud | Set ANTHROPIC_API_KEY |
Gemini | ~$0.01/use | Cloud | Set GEMINI_API_KEY |
Want to customize? Create a config file:
Project-specific (.git-smart-squash.yml in your repo):
Global default (~/.git-smart-squash.yml):
Install Ollama from https://ollama.com and run:
Make sure you're on your feature branch with committed work:
When using Ollama (local AI), there's a hard limit of 32,000 tokens (roughly 128,000 characters). For large diffs, try:
- Breaking your work into smaller chunks
- Using --base with a more recent commit
- Switching to a cloud provider for this operation: --ai-provider openai
Check out our detailed documentation or open an issue!
MIT License - see LICENSE file for details.
Made with love for developers who want cleaner git history