Ello Ello.

Can you recommend a program with which I can generate commit messages locally? I DO NOT want an LLM local or cloud API. What I want is a tiny or small language model. If I could easily swap or customize the model for each project, it would be better, too. So I could have smaller models for specific projects. I can do the training meself.

Thanks in advance!

  • lime!@feddit.nu
    link
    fedilink
    arrow-up
    11
    ·
    17 hours ago

    why generate commit messages? they are notes to yourself about what you have done and why. they don’t need to be more than a single line.

    • aldhissla@beehaw.org
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      16 hours ago

      I’ve once worked on a project where your commits to your dev branch were supposed to be helpful to colleagues for reviews, but they had to be squashed for the feature branch, with comments adhering to the conventional commit “standard”. On the other side of it, there was a horrible pedant of a middle manager, who was rejecting merges based on (debatable) “misformats”.

      This affected billing. They supposedly had some scripts evaluating merge requests, and they’d shrug and say “the script rejected it”. This was before LLMs. Come to think of it, they’re probably replaced by an LLM now, prompted by the customer to “try to defraud and fuck with the workforce on every commit”.

      So to sum up, maybe OP’s in some sort of corporate hell, or maybe they want a bit more than going git commit -m every time.

    • Farooq@realbitcoin.cashOP
      link
      fedilink
      arrow-up
      3
      ·
      17 hours ago

      they are not notes to meself when there are others in the project. And the commit message is not always one line. Sometimes it’s more. And even if it is one line, it is still annoying to manually type for everything and every change.

      • lime!@feddit.nu
        link
        fedilink
        arrow-up
        9
        ·
        16 hours ago

        but that’s your job. document the rationale of your changes for others.

      • Ephera@lemmy.ml
        link
        fedilink
        arrow-up
        6
        ·
        16 hours ago

        You and your team will have to decide, but in my experience generating commit messages is not particularly useful.

        Because you really just want a short (ideally one-line) summary of the changes. If someone’s interested in the details, they can look at the diff (and hell, have that then summarized by an LLM, if needed). Adding a bullet point list for each concrete change adds a ton of noise to the commit log, which is IMHO not worth it.

        Where long commit messages are actually useful is for documenting things that aren’t written into the code, mainly why you made the change. But since they’re not in the code, the LLM can’t generate that part for you.

        • Farooq@realbitcoin.cashOP
          link
          fedilink
          arrow-up
          2
          ·
          15 hours ago

          I see. didn’t think of this one. Note that there is a commit message, one line, and there is an extended description. The extended description, most of the time, is like you said and an LLM cannot do it. But I was wondering if that one line could be auto-generated. If not for every commit, at least for some common changes. But I will take your word that a Language model won’t be good.

          • Ephera@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            13 hours ago

            I mean, that one line summary is definitely doable for an LLM (not so sure for a small model, but maybe with the right harness).

            The only reason I wouldn’t consider it useful there, or perhaps even harmful, is that I can really recommend knowing the gist of that summary long before you think to commit. You should have an idea of what atomic change you want to make before you start coding.
            Obviously, you’ll likely be wrong and need to make other changes beforehand, but then you can git stash, make the other change and continue on your original objective.

            I’ve had juniors before that really struggled with not getting overwhelmed trying to change everything all at once, and it really clicked for them when I told them to think of their commit message before they start, so yeah.

            Having said that, I have a colleague that’s not too hot with English and probably also has dyslexia, and he just writes the rough message, then has a language model clean up the formulation + typoes. I do think that’s a good use for a language model.