My Git history was a mess of 'update' and 'fix' – so I made AI clean it up

github.com

62 points by fka 17 hours ago


twodave - 15 hours ago

A great many stiff serious people (in my opinion) are writing very discouraging comments here. Don’t let it get you down. The whole point of hacker culture is to break rules. If that’s what you enjoy then to hell with anyone else’s opinion. I think if you’re more worried about commit history being pristine than the experience of writing code and solving problems then you’ve missed the boat that makes the profession meaningful. Similarly, though, if writing lots of high quality commit messages is your idea of a fun weekend, then go do that and don’t listen to me, either.

austinshea - 14 hours ago

The value of the space is the ability to glean the commit author's thoughts, at the time they committed it.

This is extremely dissimilar to the thoughts of the author.

The value of what this emits is already handled by evaluating the diffs in the per-file history.

It's not good to throw this sort of thing over the fence, and justifying it by considering it to be wasteful of your precious time doesn't change that.

It's better to leave it blank, but a tool like this looks perfect to help someone avoid scrutiny, while simultaneously avoiding providing a tiny depiction of what they were thinking when they committed the change, at the expense of injecting vast amounts of noise.

bariskayhan - 7 hours ago

I actually see the value here. People love to dunk on devs whom write lazy fix or update commits, but projects aren’t linear. you’re figuring things out as you go. What makes sense at one point can look totally meaningless a few weeks later because your context changed. The real value for me would be adding why something was changed, maybe even referencing future commits so the history makes more sense in hindsight.(of course you can see that changes through commit history)

greazy - 17 hours ago

I've never seen a single character github username. I thought there was always a minimum number of characters!

jeena - 15 hours ago

I wish something like this could be a pre-hook which would pre-fill your commit message so that at least I could see a llm commit message instead of ust the Jira-ID because we only force that one. Most of my collegues at work just write the worst commit messages and I don't understand why. They spent so much time comming up with some solution and push it and then don't explain the thinking. Sometimes I'm in a position where I can ask for following fairly simple rules like https://handbook.gnome.org/development/commit-messages.html but most of the time it looks like shit and there is no way of knowing from the commit messages what is going on in that commit. Or perhaps it could be build in into the git-ui like Gerrit or GitLab where you can generate the commit message afterwards from the commit if it's not good enough for you.

vahid4m - 13 hours ago

This is what I think AI thrive at. But I'm not sure if its real value or not. We all have repos with fairly clean git history and repos with as the author said "fixes" and "updates". If there was any value in having a clean history in such repos it would have already been clean.

KurSix - 8 hours ago

AI-generated commits are useful, as long as they act as a post-processor rather than the author. If the history is already a mess, the tool can structure it chronologically, restore the connections between changes, and describe what they mean. The main thing is that it must not change public SHAs, it needs to mark its own entries as machine-generated, and it should keep the original messages saved somewhere nearby

virajk_31 - 13 hours ago

This is coool, haha. I remember spending time on git rebase to satisfy my OCD.

procaryote - 11 hours ago

It would be useful to tag the autogenerated commit messages as [LLM] or something. That way I could at least know the author didn't write this themselves, and decode it accordingly. Humans and LLMs both make mistakes, but they make different styles of mistakes

Also, it seems a tool like this would be much better suited to help someone who wants more fluff understand a terse git history, than to rewrite the history. That way, you'd benefit from any later improvements of the model rather than freeze comments at whatever level of slop was the state of the art of the day

wilg - 14 hours ago

I use the GitHub Desktop AI commit message generator, which is often better than a bullshit commit message, especially for small projects. It is often sufficient (though too verbose) for simple changes, but does regularly miss the point.

But I do agree that you want the commit message to encode your reasoning for the change.

If anybody who works on one of these commit message generators is around, some requests:

1. just allow it to take any existing commit message I've already written and expand it based on the diff. that will let me have a starting point or give a crappy but directionally accurate intention explanation

2. look at surrounding code agentically

3. make the commit messages shorter and less fluffy

UltraSane - 16 hours ago

Git commit histories should be immutable.

cube00 - 17 hours ago

Perfect for [...] improving repository maintainability.

This misses the whole point of using commit messages to record intent.

At least with a bunch of "fixed it" commits I know what I'm in for. This only fools yourself and others into thinking the repository was well maintained.

pton_xd - 17 hours ago

I think this is the beginning of the end of Github. Who has time to read through all these new vibe-coded projects and tools? The READMEs alone are basically essays. You can always get a chuckle or two if you read long enough though, so there's that...

"

Acknowledgments

- OpenAI for providing the GPT API

- The conventional commits specification

- The git community for powerful version control tools

"

The future of sharing code is probably dead. Everything is write-only now. Vibe it yourself.

h4ny - 15 hours ago

This feels like a step backwards and now people who never bothered to write proper, appropriate commit messages for others to start with can care even less.

I personally don't see what the use case of this is -- you shouldn't even be hired in the first place if you can't even describe the changes you made properly.