Show HN: Build the habit of writing meaningful commit messages

github.com

21 points by Aplikethewatch 2 hours ago

Too often I find myself being lazy with commit messages. But I don't want AI to write them for me... only i truly know why i wrote the code i did.

So why don't i get AI to help me get that into words from my head?

That's what i built: smartcommit asks you questions about your changes, then helps you articulate what you already know into a proper commit message. Captures the what, how, and why.

Built this after repeatedly being confused 6 months in a project as to why i made the change i had made...

Would love feedback!

journal 19 minutes ago

ok, but did they have to make commit message required, or is there a way to disable it? i think of git as checkpoints, nothing more. the day i have to explore history is the day i quit.

  • landr0id 5 minutes ago

    totally. the fact git-quicksave isn't a standard command that commits with an "Autosave" message is pretty short-sighted.

Uptrenda 21 minutes ago

All my commit messages are a mess and I spend the time that I have designing and writing code, not figuring out how to make the commit message look pretty. That's what merges are for. I don't see the value of this tbh. Just pedantic time wasting.

  • wredcoll 6 minutes ago

    When these people say "commit" they're referring to the same concept you "merge".

delusional 25 minutes ago

I'm assuming the commits in the repo were generated with the tool itself. In that case, commit `cc677f7` has a (in my opinion) terrible commit message. It starts out with a listing of stuff I could just as well read from the patch. It then contains another list that tries to explain the why, but it ends up being useless fluff like `The full path specification in `go build` was redundant given the context of how Go modules are structured.` and `streamlining the project structure and reducing unnecessary directory complexity.` which tells me exactly nothing about why those changes were made.

It generates a whole lot of text that makes me none the wiser as to why you wanted to do any of those changes. It feels like a robot trying to justify the changes post hoc. Which it of course is, so that's understandable.

Don't take this comment as rudeness BTW. It's cool that you're making a fun little tool. I'm assuming you care about writing more useful commit messages, so I thought I'd give you some feedback on that part.

  • Aplikethewatch 19 minutes ago

    Yeah totally see where you're coming from, i seemed to have been slightly lazy with that commit... However, the tool does ensure that the dev has the final say; it will open the user's editor with the commit message that the ai has 'drafted' so the dev can make necessary changes - it provides a starting point that a dev can then tailor.

teeray an hour ago

> strictly enforces the Conventional Commits specification (feat, fix, chore, etc.).

Nope. Waste of bytes in my commit message header that are better done by git trailers.

Otherwise, I love the idea of the tool. I personally try to answer “why does this commit exist?” when I create commits.

  • Aplikethewatch 41 minutes ago

    Interesting, never knew about git trailers - will have a look!