Show HN: Tool to Automatically Create Organized Commits for PRs
By
edverma2
I've found it helps PR reviewers when they can look through a set of commits with clear messages and logically organized changes. Typically reviewers prefer a larger quantity of smaller changes versus a smaller quantity of larger changes. Sometimes it gets really messy to break up a change into sufficiently small PRs, so thoughtful commits are a great way of further subdividing changes in PRs. It can be pretty time consuming to do this though, so this tool automates the process with the help of AI.
The tool sends the diff of your git branch against a base branch to an LLM provider. The LLM provider responds with a set of suggested commits with sensible commit messages, change groupings, and descriptions. When you explicitly accept the proposed changes, the tool re-writes the commit history on your branch to match the LLM's suggestion. Then you can force push your branch to your remote to make it match.
The default AI provider is your locally running Ollama server. Cloud providers can be explicitly configured via CLI argument or in a config file, but keeping local models as the default helps to protect against unintentional data sharing. The tool always creates a backup branch in case you need to easily revert in case of changing your mind or an error in commit re-writing. Note that re-writing commit history to a remote branch requires a force push, which is something your team/org will need to be ok with. As long as you are working on a feature branch this is usually fine, but it's always worth checking if you are not sure.
Comments URL: https://news.ycombinator.com/item?id=44324457
Points: 5
# Comments: 0
You might also wanna read
git-lrc: AI Code Review Tool for Git Commits
git-lrc is a tool that provides free, unlimited AI code reviews that run automatically on git commits. It addresses the problem of AI-genera
GitusAI: AI Tool for Automated Commit Message Generation
GitusAI is an AI-powered tool that automatically generates clear, professional commit messages by reading code changes. The tool aims to str
Updated.dev: AI-Powered Tool Converts Git Commits into Release Notes
Updated.dev is a tool that automatically converts Git commits into professional release notes using AI. Users connect their repository, sele
LaReview: Open-Source Tool for Structured GitHub Code Review Planning
LaReview is an open-source tool that transforms GitHub pull requests or unified diffs into structured review plans. Instead of manually scro
SnapCommit: AI-Powered Git Assistant for Natural Language Command Execution
SnapCommit is an AI-powered Git assistant that sits in the terminal and executes Git commands based on natural language input. It automatica
