top | item 45678626

(no title)

thallavajhula | 4 months ago

Aside: The demo shows git commands being run in the CLI. I absolutely hate it when devs use a commit message that says "chore: my first commit from gemini cli" - I get that it's meant for the demo, but in general too, I've seen codebases that enforce these commit prefixes such as "chore", "feat", "bugfix" etc. Is there any real value to that? Besides wasting up the 50 character limit on the first line of the commit message, I don't see anything else being done including those. Also, non-imperative commit messages?! Come on, guys!

discuss

order

dustypotato|4 months ago

If you're looking in the commit tree for which commit fixed a certain bug, but didn't fix it fully , for example , you first look at all the `fix:` and then if it matches, you read the rest. You just write `fix: Thumbnail wasn't updating after upload` to `Fix for Thumbnail not updating after upload`, which isn't really wasting characters.

But I'm also not a fan of this being an enforced convention because somebody higher up decided he/she it brings some value and now it's the 101st convention a new dev has to follow which actually reduces productivity.

theknarf|4 months ago

If you manage a product that releases changelogs then by tagging commits that way you can automatically group changes into headers like that when generating your changelog from your git history. It's fairly common in open source projects. If you however are working on some internal stuff at a company, and you don't generate changelogs from your commits then doing conventional commits isn't that useful.

ilikepi|4 months ago

> I've seen codebases that enforce these commit prefixes such as "chore", "feat", "bugfix" etc. Is there any real value to that?

It's a choice some teams make, presumably because _they_ see value in it (or at least think they will). The team I'm on has particular practices which I'm sure would not work on other teams, and might cause you to look at them with the same incredulity, but they work for us.

For what it's worth, the prefixes you use as examples do arise from a convention with an actual spec:

https://www.conventionalcommits.org/en/v1.0.0/

jval43|4 months ago

Just because someone put up a fancy website and named it "conventional" doesn't mean it's a convention or that it's a good idea.

The main reason this exists is because Angular was doing it to generate their changelogs from it. Which makes sense, but outside of that context it doesn't feel fully baked.

I usually see junior devs make such commits, but at the same time they leave the actual commit message body completely empty and don't even include a reference to the ticket they're working on.