Using AI to Write Your Commit Messages
Most commit histories aren’t as useful as they could be
I remember debugging a broken pipeline and tracing it back to a commit message that just said “fix”
Many of us are familiar with standards like Conventional Commits that define what a good commit message should look like. But in practice, people still rush through this step. By the time the code is ready, nobody wants to spend extra effort describing it properly.
As a result, commit history often ends up being far less useful than it should be. Instead of helping with debugging, code review, and understanding why a change happened, it becomes another thing engineers have to work around.
That is why using AI to generate commit messages is a practical use case as it helps to reduce the friction of writing commit messages that are actually useful.
Where AI Actually Helps
AI does not magically make commit messages important. It just removes the worst part of writing them: starting from nothing.
The model only needs to read a diff, identify the dominant change, summarize it into a sentence, and format it consistently.
Instead of this:
update auth logic
You get this:
feat(auth): add token refresh flow for expired sessions
AI drafts the message, you review it.
Tooling Options
You do not need to overthink the tooling. Pick the path that matches your workflow.
Copilot in VS Code if you want the easiest built-in experience.
AICOMMITS if you want to use your own API key, choose your provider, or run against local backends.
GitLens if you already use it heavily, but note that AI-generated commit messages are part of the paid Pro tier.
Do not skip the instructions - the tool matters less than the instructions.
Even a good model will generate average commit messages if you do not tell it what good looks like.
Here is a simple example:
Generate a commit message using Conventional Commits.
Format:
<type>(<scope>): <subject>
Optional body:
- Include only if extra context is useful
- Keep it brief
- Focus on why the change was made if it is obvious from the diff
Footer:
Jira: https://your-company.atlassian.net/browse/<TICKET-ID>
Rules:
- Allowed types: feat, fix, refactor, chore, docs, test, perf, ci, build
- Use a scope when relevant
- Keep the subject under 72 characters when possible
- Use imperative mood
- Do not end the subject with a period
- Avoid vague wording like "update", "change", "fix issue", or "misc"
- Prefer the user or system impact over file names
- Return only the final commit message in plain textOne thing worth checking before using any of these tools: Make sure your company allows code or diffs to be sent to external AI providers :)
Final Thought
This is not about replacing judgment. It is about making useful commit history easier to maintain.
Your future self might thank you when you are debugging a regression, and AI agents will have a better trail to follow when they need to figure out where a bug was introduced.
Stop settling for bad commit messages!

