75 comments

  • austinshea 2 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.

    • AmbroseBierce 42 minutes ago

      I would be more interested in an hybrid approach, an AI that when has low confidence in a generated commit message asks the user for their input: "Was this change meant to fix a bug? y/n" and about splitting commits "you changed 6 html files and 1 SQL file, they seem unrelated" should I split that into 2 separated commits? y/n"

      • selfhoster11 25 minutes ago

        That actually sounds like a good match for LLMs' ability to do fuzzy intuition and pattern-matching.

  • twodave 4 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.

    • Spivak 3 hours ago

      Yeah this project is great, it's exactly the kind of tedious work that should be automated by AI. Some weirdos are going to mythologize commit messages and MR descriptions like they aren't our industry's version of pointless paperwork.

      • thfuran 3 hours ago

        They aren’t pointless. They are (or at least can be) useful documentation. If they’re pointless, why bother generating them with AI instead of just leaving them blank?

        • Spivak an hour ago

          I see it as the same issue as doctor's notes. They're extremely useful but it's a waste of time to actually make the doctor do them. At some places it's a person's whole job to follow around a doctor and do all the busy work for them.

          I'm not nearly important enough to have an intern write my commit messages but now that AI can do them, and do them extremely well, I'm more than happy to offload the work and get back to the actual work. The AI is far more thorough than I would be and because it takes away nearly all the mental effort the end result is, I think, better.

          • hrimfaxi 41 minutes ago

            At least a scribe captures the doctor's thoughts. AI is not capturing the author's thoughts because it doesn't know what they were at commit time.

      • koolba 3 hours ago

        The number one audience for commit messages is yourself.

        If you don’t have respect for your future self, don’t expect me to have respect for you.

        • esperent 2 hours ago

          I've literally never gone over my old commit messages on any personal projects.

          The only time I've ever regretted not writing better messages on personal projects is when they eventually became shared. Which is like, twice, in a decade or so and wasn't even a big deal in those cases.

          So when I'm writing commit messages, it is exclusively for other people.

          • kemayo an hour ago

            I actually have. I have a bunch of long-running projects, and it has sometimes been useful to be able to look back to the commit that added some behavior I'm not sure about now and go "oh, okay, this was part of a commit in 2014 where I said I was doing X".

            (And sure, you could also say that I should have added better documentation back in 2014...)

          • apsurd 2 hours ago

            The messages are for other people, also it's like any type of writing: tremendous value in the process of writing. in that way, i'm agreeing with the parent, it is for yourself. The process of writing commit messages is useful to yourself.

            Being a good communicator is very commonly the main difference between "moving up" in one's career. Quotes because i don't want this to be a debate about IC vs management tracks.

            • esperent an hour ago

              I tend to write actual documentation or notes as I'm working on the software, even for personal projects. This is far more useful to me than commit messages.

              • apsurd 32 minutes ago

                even better!

  • jeena 3 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.

    • what 2 hours ago

      Why would you force a ticket number in the commit header? That belongs in a trailer, which you can still enforce and analyze.

      Also please kill conventional commits, that info should be in a trailer too.

  • greazy 5 hours ago

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

    • fka 5 hours ago

      I've created my account ~16 years ago :)

      • JoshTriplett 5 hours ago

        Do you get a lot of misdirected notifications from people who write the wrong `@`?

        • fka 5 hours ago

          it's like, every day ;_;

          • gerdesj 4 hours ago

            I used to have a rather short, pithy gmail address back in the day. I binned it for gerdesj@ instead - a username which I use nearly everywhere.

            A one char ID on a web app is all very well but is the extra hassle worth it?

            • fka 4 hours ago

              Nope, just seems cool.

              • AmbroseBierce 4 hours ago

                Yeah, same rationale that Elon shared for renaming Twitter to X, so for good or evil you have that trillionaire mindset pinned down.

    • OisinMoran 2 hours ago

      It's funny, on mobile the ellipsis Github uses to truncate the username in the path actually takes up more space than if they just showed the "f"

    • andix 4 hours ago

      I know another single char user, and couldn't believe it either. I think possible options are a-z and 0-9, so only 36 people in the world got that lucky.

      • Lalabadie 2 hours ago

        That got me curious. My Github username is three characters but includes a hyphen.

        Turns out it's a valid single-character name as well on GH:

        https://github.com/-

      • biinjo 2 hours ago

        No UTF-8 support?

  • vahid4m an hour 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.

  • virajk_31 an hour ago

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

  • wilg 3 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 5 hours ago

    Git commit histories should be immutable.

    • fka 5 hours ago

      totally agree. in principle, commit histories should be treated as immutable, especially on shared or production branches.

      this tool is not meant to rewrite public history or alter real project timelines. it's more of a utility for personal or experimental repos (or branches), the kind of messy ones full of "update again" commits that never had a proper history. that's exactly why I built it.

    • Smudge 5 hours ago

      only once pushed or merged to a shared branch.

    • virajk_31 an hour ago

      Not sure I agree, I don't even remember how many times I have moved HEAD down.

    • Ferret7446 3 hours ago

      There's actually a mechanism in Git to add notes to commits after the fact, unsurprisingly called notes

      • sunaookami an hour ago

        huh TIL. Does GitHub show these notes in the UI?

    • mathstuf 4 hours ago

      They are. If you rewrite history, you get a different hash. You can do some shenanigans with git-replace, but those are usually for stitching history across gaps (like hooking pre-publish history to public release for internal archaeology at least.

      What you actually want is a ban on rewriting tags or accepting branch updates to commits that do not have the current commit as an ancestor. These hooks do exist, but are not on by default (beyond the toilet paper protection of needing --force).

      You also have to ban deleting branches because otherwise you just delete and push a new one with the same name. Maybe we should store topic branches in repos under refs/topics/ to distinguish integration branches from development/review branches?

  • cube00 5 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.

    • nikeee 4 hours ago

      Yeah, "fixed it" doesn't provide any information that might be hallucinated.

      Please don't use AI-generated commit messages blindly. Instead, use AI later when reading commit messages. It will have more context (following commits) to see what was actually happening. Having to guess whether a message was hallucinated by an AI won't help. If the message conflicts in its intention with what it isactually doing, you can spot the bug. You won't get that with AI messages.

      Also, using AI commit messages will freeze it's capabilities in time, when creating the commit. When using AI at reading commit messages, you'll always get the latest options for analyzing the commits.

      Just because it has more text doesn't make it a better message.

    • fka 5 hours ago

      Good point. The purpose of git-rewrite-commits isn’t to "polish" history or rewrite meaning, it’s more of a rescue tool for those chaotic early stages of side projects (like mine) where commits are basically "update again" for months.

      In those cases, the "intent" was never recorded in the first place, so the AI is just giving some structure and readability to what’s already lost context.

      It’s not about pretending the repo was well maintained, it’s about making messy histories a bit more understandable for humans (and future me) without rewriting the actual code or meaning.

      • MangoToupe 5 hours ago

        I think that's perfectly fine on a branch. I don't see this being deploying on the main branches of any projects of note.

        • fka 5 hours ago

          Agreed! I've already added several warnings and disclaimers to the README :) It's really meant to be a "use it once or twice in your lifetime" kind of tool, not something to run on every project. Actually, mostly shouldn't.

      • cube00 5 hours ago

        > those chaotic early stages of side projects (like mine) where commits are basically "update again" for months.

        I don't accept "chaotic early stages of side projects" is a justification for skipping out on writing good quality commit messages.

        It wouldn't be acceptable in a well managed company so I don't understand why side projects would get a pass to become sloppy.

        It's your side project and you're free to skip writing commit messages, but you need to own that decision and not blame "those chaotic early stages"

        I've found taking the time to write good commit messages helps me as I can see what I've tried previously and pull out any older versions if I've found a new direction isn't working for me. It also captures my thought process in case I'm tempted to repeat the sins of the past.

        • FuckButtons 3 hours ago

          Sorry, but this holier than thou attitude is silly. If you’re working on a side project after your kids are in bed and you want to write “did stuff” as your commit message, you don’t have to feel like you’ve committed a sin.

        • milkey_mouse 4 hours ago

          > It wouldn't be acceptable in a well managed company so I don't understand why side projects would get a pass to become sloppy.

          Because no one's paying you, and you owe your users nothing?

          • cube00 4 hours ago

            > Because no one's paying you

            While I'm certainly getting there, I'm not cynical enough to believe being paid is the only reason to take pride in the quality of your work.

            • retsibsi 18 minutes ago

              I don't think that's the idea; it's more that when you're not beholden to an employer, you can focus on (and take pride in) whichever aspects of the work you want to focus on. When I'm working on my own projects, most of the pride I take in my code is based on what it does -- not on how clean it is, and certainly not on how well organised is the repository it lives in.

              Yes, sometimes that makes things harder in the long run, but on the other hand there may not be a long run for this project if I try to force myself to do all the tedious bits 'correctly'. (And 99% of the time what bites me is my sloppy coding practices; it's very rare for much to hinge on the quality of my commit messages.)

            • milkey_mouse 3 hours ago

              Ha! I practice good commit hygiene---even when no one's paying me---because it's useful to my future self, but I don't think pride in one's work (especially through importing workplace best practices) is a great reason, especially not a normative one. I think this is like the proverbial carpenter finishing the back of a drawer though no one will see it. It's done for the carpenter's sake, out of principle or mundane Calvinism, and I wouldn't begrudge a carpenter who didn't. And the latter might sell more furniture.

              • milkey_mouse 3 hours ago

                But yeah, if someone made a cabinet with fancy Japanese joinery that turns out to be inkjet AI-generated veneers over glue and nails... I would not buy it.

        • twodave 4 hours ago

          I think it’s a great justification. It’s a side project. It’s supposed to be fun. If you hate writing commit messages, though, of course you can always just commit with the amend option and force push. But in general I think side projects are better the fewer rules they have.

        • jghn 5 hours ago

          Not all git messages are equal. My $0.02 is that commit messages I write are for other people. Until I officially hand a branch over for other people's consumption, like a PR, if I'm committing the only reason is because I want to access my code on another machine. I'll put whatever junk I please in those commit messages. But then before I open a PR I'll collapse everything down into 1+ commits each with curated content and appropriate messages.

          • cube00 5 hours ago

            > My $0.02 is that commit messages I write are for other people.

            I write them for my future self.

            In this context we're talking about a side project which presumably won't have a PR where the commit messages are cleaned up (at least I don't do PRs for my own side projects).

            If I'm on a branch then I will write junk commits and clean them up before merging to main if I actually manage to get the feature right.

          • accoil 3 hours ago

            This project shows that git messages aren't just for other people as it's an attempt to make terrible messages usable for the person who wrote the code in the first place.

        • leptons 3 hours ago

          Git commit messages are nothing to obsess about. If you're worrying about a "messy" git commit history, you're not moving forward, you're stuck in the past, and that indicates bigger problems. The only thing that really matters to me is the state of the code today, not 500 git commits ago. But I don't know what kind of work you do, I just know I don't have time to obsess about anyone's git commits from weeks or months ago. I just know where the code is today, and where I need it to be in the next iteration. Sure, write a basic commit message, but don't waste time on it. And don't obsess about "rebuild" commits or whatever extraneous thing that needs a commit. It isn't going to matter if you're always moving forward.

        • Spivak 3 hours ago

          > It wouldn't be acceptable in a well managed company so I don't understand why side projects would get a pass to become sloppy.

          I can assure you that it's very acceptable at companies of all sizes and ironically it's the most senior most experienced people who write "flerpin derpin" as commit messages.

    • acjohnson55 5 hours ago

      I'm guessing that the intent is deducible from the diff a pretty large percentage of the time.

  • h4ny 4 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.

  • pton_xd 5 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.

    • ip26 4 hours ago

      Counterpoint: LLMs seem to depend on robust, stable, and easy to use libraries nearly as much as we do. Due to context limitations, vibe-coding a mega-monolithic project in one shot with zero dependencies would be a silly exercise. Therefore, there is still a use for sharing code, even if plenty of it is agentic.

      • ninetypercent 4 hours ago

        LLMs only "depend" on libraries because library usage is in their training set. Clearly they don't actually need to use libraries.

        • ip26 3 hours ago

          Using a library keeps the context window smaller than writing it all yourself. I also suspect the whole vibe-coding thing works best when most of the total running code is NOT vibe-coded, and follows carefully defined behavior the fast-and-loose parts can build on top of.

          Otherwise, why bother to run your vibe-coded website on nginx? Just have the LLM spit out its own novel web server, its own novel TCP stack, its own novel OS for that matter.

    • what an hour ago

      > conventional commits specification

      Please stop following this. It provides zero value.

    • cube00 4 hours ago

      Interesting that OP removed this [1] from the README and didn't explain why in their commit message or by replying to this comment.

      [1]: https://github.com/f/git-rewrite-commits/commit/210ada7ec78f...

      • fka 4 hours ago

        honestly, I used to like writing README files before the AI (see my other repos), but I don’t like writing them anymore. GPT does it really well, it may have some mistakes but thankfully, you guys highlight them :)

        • cube00 4 hours ago

          [flagged]

          • dang 3 hours ago

            "Have curious conversation; don't cross-examine."

            "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith."

            https://news.ycombinator.com/newsguidelines.html

            • bakugo 2 hours ago

              > Please respond to the strongest plausible interpretation of what someone says

              What is the "strongest plausible interpretation" of that comment? Because I interpreted it in the exact same way, and don't really see any other possible interpretation.

              • dang 44 minutes ago

                Since the HN community is obviously not reviewing every commit in all of the OP's repos, I imagine that the last bit ("you guys highlight them") was a light-hearted reference to the current thread.

    • bakugo 4 hours ago

      > docs(readme): remove acknowledgments section

      Heh. I wonder if the author asked GPT to remove that section from the readme.

      • fka 4 hours ago

        yes that’s what I’ve done! :)

        • what an hour ago

          You should drop the conventional commits nonsense. “docs(readme):” provides less than zero value.