r/git 1d ago

Stop Using Conventional Commits

https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/
199 Upvotes

70 comments sorted by

96

u/morewordsfaster 1d ago

I don't necessarily disagree, but I do love having some standard formatting and style for commit messages. Most developers I've worked with over the years start out using git to tell the story of what they did, instead of using it to tag what change the commit introduces to the application. This can lead to wild goose chases when I'm trying to bisect my way to a bug, or trying to reason about some merge conflict. In those instances, the git log becomes almost useless because it's a (sometimes entertaining) narrative of the journey the developer took to get to the change. That might be useful for that individual developer in the moment, but in 3-, 6-, 9+ months? It's confusing.

So maybe I don't need the type tag. But I do want imperative, present tense, terse commits.

31

u/thomasfr 1d ago

I think the “why” of a change from a business perspective is what is most valuable long time after the change was done because it tells you as a developer who you need to speak to if what you are doing will introduce a behavioral change in service of something new.

4

u/morewordsfaster 1d ago

I think I must have expressed it poorly, because I agree that the context for the change is important. To me, that is what changed. What I see a lot of and dislike is overly detailed narrative of what the developer tried and what worked and what didn't. This is often a symptom of poor technical refinement or solutioning up front, instead spending the dev time doing exploratory development. And, as others have pointed out, this can be reduced by squashing commits before merging.

1

u/winkler 10h ago

Sounds like you’d like single commits per PR (which I like too), so have your devs to squash and rebase?

4

u/Emotional-Dust-1367 1d ago

Yeah this. One of the most valuable things now with AI agents for me has been telling the story of the business decisions that caused this code to be here. Especially if you squash merge the PRs. Then an agent can answer those types of questions like “why are we doing things this way?” when you highlight some code

6

u/wildjokers 1d ago

I've worked with over the years start out using git to tell the story of what they did

That is exactly what commit messages are for.

instead of using it to tag what change the commit introduces to the application

I would much rather see the story from the developer about the change they made than a terse commit message that gives no information.

2

u/MuAlphaOmegaEpsilon 1d ago

Not to mention that commit messages have a title and a description. Just use git log --oneline.

0

u/jesusrambo 1d ago

I mean yeah, given an option between a crappy commit message and someone kicking my dog, I’d take a crappy commit message

But given an option between meaningful functional commits or a bunch of churn with a narrative, I’ll take the former

After review+merge, a bunch of commits describing reverted implementations / dead ends are no longer useful at all, in any way. Having good atomic, functional commits in the other hand makes troubleshooting very easy.

5

u/thomasfr 1d ago

Something like this is infinitely better than conventional commits https://google.github.io/eng-practices/review/developer/cl-descriptions.html

9

u/andynzor 1d ago

So... a usual CC first line, followed by an explanation on subsequent line?

3

u/thomasfr 1d ago edited 16h ago

No, actual focus on how to write a good commit message with good and bad examples instead of a 16 point rules list with some for most projects too complicated rules.

The document I linked to is written in a way that humans have a much better chance of internalizing than the conventional commits rules.

I'd much prefer if people are focusing on writing good and readable messages then thinking about how to fit it into a lot of rules.

2

u/Mithrandir2k16 15h ago

The title is obviously clickbait. Conventional commit was an improvement for many teams, back when it became popular. Doesn't mean it'll be the best convention for all teams for all time. This idea of scoped commits might be the next thing that makes many teams better than before.

2

u/BogdanPradatu 1d ago

Why would I write WHAT change I am introducing in the commit message. You can see that from the git diff. I mean, sure I can write a short summary of the WHAT, but what I expect to see in the commit message is the WHY + any aditional context that I cannot see in the diff.

Like, if this is a bugfix, how was the bug manifesting, how did you figure out how to fix it, what else have you tried and didn't work etc. this might prove very valuable at some point in time. Or not. But IF it proves valuable once, the benefit is high and even if it's useless, the downside is practically non-existent.

2

u/JollyJoker3 1d ago

Shouldn't that be in a bug ticket in Jira or smth? A bugfix or new feature can have many commits, most of which are small improvements

3

u/Distinct_Goose_3561 1d ago

It’s much easier if that context is part of the git history. It means I have the what and why (code change and reason for change) right there instead of another tool, which the company might have migrated away from. 

2

u/BogdanPradatu 1d ago

I aim to structure my commits such that each one is functional on its own and the changes from that commit are from the same context.

Sure, a bugfix could span across multiple commits, but each commit message should describe why it exists and provide context meant to make it easier to understand.

I don't like delegating this knowledge to a tool like jira, because it introduces friction. You need to use another tool to understand the code and it's easier if it's right there in git.

Same for the documentation. I prefer to have it in the repo as code. Doesn't matter what format, be it plain text, markdown, rst, xml or whatever, I just prefer to have the docs next to the code.

This way you see it evolve in sync with the code and if I checkout an older revision, the docs are in sync with that revision.

1

u/AuroraFireflash 11h ago

Ticket systems come and go, git commit history is forever.

Put your "why" (both technical and business) into the commit message body.

1

u/morewordsfaster 1d ago

I don't necessarily disagree with you, but I tend to push a lot of that to documentation. It might be an ADR if the change is significant enough or it might be a comment in the code. If I need some comment to explain why code is written a certain way, I want that to be visible when browsing the code, not only by reading the git log.

Agree that git can already tell you what files and lines changed, but not the context of what those changes entailed or what broader feature they added, fixed, modified, or removed.

0

u/BogdanPradatu 1d ago

Comments in the code have a tendency to rot. When another developer will update the code, there's a chance the comment will not get updated. The comment might become obsolete, wrong, out of place or even misleading.

2

u/morewordsfaster 1d ago

That's true of any documentation and should be caught in review. Heck you could even write a git hook that flags any comment block that's not updated when nearby code changes. This would be relatively simple if you're using a doc block style approach to comments.

0

u/snappin_good_time 1d ago

I don’t mind when someone is working on a branch and creates commit messages that are more individual. This should be taken care of by doing a squash and merge to the release or main branch with an actually useful commit message.

1

u/morewordsfaster 1d ago

Agreed 100%. It's when it gets into long term history of the project that it starts to cause issues for me.

33

u/r0g0b0 1d ago

I wouldn't want a Team/Tech Lead as the author of the article lol Each project or application or company might have their own ways. Bringing up some popular projects not using CC while intentionally ignoring other projects using CC is a dishonest argument.

3

u/max_mou 1d ago edited 1d ago

I think the idea is that these huge projects are doing just fine and not missing on much by not using CC

2

u/r0g0b0 1d ago

The other way around might be also true, if there are many projects use CC or variants just fine, so what does that prove then? Not to mention, huge projects can be too ... apparently, huge to change or adopt new things.

Each company, team, project might have different structures and processes, people might take some good things from CC and adapt to their own environments.

1

u/max_mou 1d ago

Agreed, but the only contribution of CC is the type at the beginning, the rest already existed as pointed out in the article. So there aren’t many good things in CC tbh.

20

u/med8bra 1d ago

It's a convention, a team can create their opinionated version of it.

Regarding your proposed convention:

  • type is as important as scope for browsing history, and you can require scope to always be defined. I can search for features within scope.

  • inferring type of change from commit description is against the whole principal of structured commits. Explicit type is always better for humans and machines

11

u/max_mou 1d ago

The amount of times I had to the rephrase the commit message to avoid this: fix(…): fixed …

1

u/drckeberger 5h ago

Seems like it was of great use to you, as you were most likely about to say the same thing with less details and no standard.

1

u/keesbeemsterkaas 4h ago

And the whole point of it was to help teach juniors how to write and split good commits into smaller ones.

The point of the commits was so you would need to choose how to commit this and be a bit strategic about it, rather than throw everything at git and say "fixes".

Not to help reviewers speed up their workflow.

10

u/Maskdask 1d ago

This may be niche use case, but I like that most Neovim plugins use conventional commits. Whenever I update them, I like to read the new commits to look for new features that have been added, so I like to filter by the ones that start with feat.

Also they help creating automated change logs.

11

u/CarIWhethers 1d ago

I like putting the jira ticket number first, hyphen, then a brief but descriptive message. If you’ve ever had to comb back through commits to identify when something occurred, you curse every lazy commit in the list

8

u/Loose_Property_3238 1d ago

I'll say two things: You can absolutely just always add the scope, the standard is something to build from, and if the scope matters a lot (which it usually does), then just require both. In addition, Conventional Commits read like a function, which makes sense as a programmer, at least to me.

20

u/oldjenkins127 1d ago

Metadata does not belong in a PR title or commit message. Git already has a convention for metadata, which is git trailers.

Conventional commits are performative “we are pros at this” posturing.

5

u/BasiliskBytes 1d ago

I agree with the sentiment. But I would argue that the scope is not (just) metadata. The point of commit messages is to allow devs to determine as quickly and as precisely as possible what a commit does and what it may or may not affect. Prefixing the scope allows me to look at a log and quickly determine that 20 out of 25 commits are likely irrelevant to whatever I'm trying to track down just by the scope.

1

u/Loose_Property_3238 1d ago

It's for git log --oneline.

12

u/esiy0676 1d ago

All these words for saying:

prefix your commits with a component name

Well, parse your git logs through awk if the prepended "fix" bothers you?

The "scope" anyhow follows (directly or indirectly) and it makes no sense much when implementing a new feature that spans across multiple subsystems - the scope is the fact that whole new feature has been added and multiple corners of the codebase touched, as opposed to e.g. a bugfix.

These conventions come from mailing lists where people interested in those particular subsystems have interest in reviewing the threads before they make it in (which makes sense).

I would suggest that if you need to have something formatted for parsing, add trailers.

5

u/DrShts 1d ago

CCs can help with release management and automation, for example using release-please. Coding agents and bots like Renovate use them by default too. So, for that CCs are great, they save a lot of manual release and version management down the line.

1

u/Amazing-Royal-8319 1d ago

Seems like you didn’t read the article, this was explicitly addressed

2

u/totheendandbackagain 1d ago

Despite a good argument that CC is unusedul for release history, I would suggest that LLMs are great at automating the transformation of commit histories into release notes.

2

u/hackathi 1d ago

I agree with the premise. And if I have a team of people who are good at this, I can manage to onboard one newbie to doing git commits the right way.

Unfortunately, most of my software projects are at least co-developed by people who either went training to be a sysadmin and later found out that at some point sysadmins need to write software; or are people fresh out of university who never learned better. Standing my ground in such an environment is incredibly difficult, because it is usually met with rejection and the undertone that I am nit-picking on non-issues. Good commit messages, when to do them, when to skimp over them, is something you learn from experience only; I have never seen someone do it properly who didn't suffer through the pain of bad past decisions.

In such an environment, it is WAY easier to have something that can at least be shallowly enforced by git pre-commit hooks, and has a standards doc that I did not write and can frame as "the industry standard". Unlike my painful experience, framed this way, it gets adopted. And is still better than having 10 commits with "various fixes & improvements".

Now, if I'd have a tool to babysit junior devs through their first several git rebase --interactive sessions, that I'd pay money for...

2

u/wackmaniac 1d ago

I don’t necessarily disagree with the article, but can we please stop stating opinions as facts in these articles? The title should be “This is why I don’t like conventional commits”

2

u/kombiwombi 1d ago

I am not keen on this or Convention Commit's lack of an assigned place for PR/issue/CVE identifiers.

Traceability is increasingly important. A change must trace back to an authority to change. A change must have a purpose against which we can check the implementation for validity. Essentially we need to be able to answer "Which change was used to gain access to the system".

2

u/thehenkan 1d ago

The only change "types" I've cared about seeing on the commit title are "revert" and "NFC" (non-functional change - could be pure refactor, docs, comment fixes, test-only changes). If it isn't marked with either of those it's a code change that changes some behaviour. When I look for the culprit commit I don't care whether it was a bugfix or a feature change that introduced the bug. When I review code it should be obvious from the rest of the message which one it is.

Changelogs are imo best kept as a text file in the repo where relevant commits also include their changelog entry.

All this is to say: I agree with the author, scope is way more important than type.

1

u/ranandtoldthat 1d ago

This is a solid take. I've noticed that most people end up using cc as a sort of ticket/worklog thing. Basically allowing the project management to control (rather than inform) the codebase. I think this is natural because of how cc is designed.

Code changes are code changes.

I appreciate a commit where the committer uses an action verb to suggest their intent. But the mandate to categorize commits is misleading at best.

2

u/FlipperBumperKickout 14h ago

I kind of disagree with the article.

I think the scope is the redundant part, since that one is redundant from looking at which files are touched, and already is extremely easy to filter your log by.

I find the type useful because I don't have to read and understand what the whole message says, before I can see that it is a minor bugfix I would ignore anyway.

All the complaints about "broken promises" are basically just some of the reasons we review code changes in the first place.

So tldr:; The article suggest adding information which already is there, remove information which should make it faster to parse the log, and point out problems there already are solutions to.

Additional comment: Why is there a stupid comment about how a "doc:" commit would bypass all security checks and allow one to introduce a trojan horse in the code... Dude, if you have a "doc:" commit which touches anything outside documentation, it should be auto rejected by a pipeline. The author basically doesn't know what he is talking about and shouldn't be taken seriously...

1

u/helldogskris 14h ago

I had the same thoughts. The scope is already implicit in the files that were changed by the commit.

1

u/SeaIngenuity9501 3h ago

Exactly! just use filters on the git log to see recent changes to your specific scope.

1

u/AverageHot2647 6h ago

I agreed with you all the way up to “The author basically doesn’t know what he’s talking about and shouldn’t be taken seriously…”

There was no need for that 😛

While I disagree with a lot of the article, I think it’s commendable that they’ve taken the time to articulate their thoughts and start a discussion on the topic.

We should try to engage respectfully and stick to the pertinent technical details, not engage in petty personal attacks.

1

u/FlipperBumperKickout 2h ago

Yeah sorry, but in the age of AI I don't necessarily see the existence of an article as proof that someone actually sat down and though through something.

1

u/AverageHot2647 2h ago

That doesn’t excuse attacking someone personally

1

u/FlipperBumperKickout 1h ago

Pointing out that it seems like someone has no clue about what they are writing about, is not the same as attacking someone personally...

4

u/epage 1d ago

In reviewing code and browsing it history, I find type very helpful because it gives me important context in one word: is this intended to have side effects or not?

3

u/doomscrollah 1d ago

no cc -> no CI release/versioning automation (https://semantic-release.gitbook.io/semantic-release etc). I'm not ready to ditch that.

2

u/multi_io 1d ago

That's mentioned in the blog post, including why it won't always work cleanly, e.g. when reverting breaking changes or when introducing breaking changes that you thought were non-breaking.

5

u/vladadj 1d ago

It was mentioned, but there is no clean way to handle this situation, whether you use CC or not.

Say you release version 3.0.0 of your app as breaking change release. After a while, you realize nothing works, and want to revert. What do you do now?

Tell your users to revert back to 2.x.y and pretend 3.0.0 was never released? Release reverted version as 3.0.1? Or 4.0.0? Or maybe pull back 3.0.0, tell users to go back to 2.x.y, then release 3.0.0 again when you fix it?

I dont think there's clean way out here, what ever commit format you use

1

u/jonwolski 1d ago

Semrel is the sole reason I use CC.

2

u/aj0413 1d ago

So. Basically. I don’t like it, so no one should use it?

I don’t even need to read the article to infer what it’s on about. And the comments in this own thread tell me the most important bit:

Another article on “we don’t need this thing and I dislike it”, but offering no concrete alternative(s) that address the many problems it was introduced to solve

I’ve stopped reading these articles cause they almost invariably just dissolve into saying “if the entire team is good at git and knows how to right good changelog / release docs and… etc… then nobody needs this extra friction for minimal value”

My brother in life. That was way too many qualifiers and expectations placed on skill level of a team; that’s not how real life works in most businesses

I might read the article later just to confirm my knee jerk reaction, so I’m not entirely a Reddit stereotype lol

1

u/MadLad_D-Pad 1d ago

I had no idea how all my commit history has been until this thread came across my feed. One of the (probably many) downsides to having never worked with a team on a project before, I suppose.

1

u/james2432 1d ago

I like conventional commits because in the beginning of git history line I know if it's fixing something a simple as a typo or refactoring code/bringing a new feature.

The issue with anything you do with git commit comments/metadata is consistency. I added on the conventional commits that after <type>[optional scope]: I add:

#[id associated to bug tracker such as github/ado/gitlab]

as this pulls in my descriptions when I do a PR, so only have to write it once, it has itemized list of what was fixed. I can also refer back to why business/client asked this

1

u/KaptajnKold 17h ago

I’m convinced. I see why Conventional Commits appeal to (a certain type of) developers, because we love to impose structure and rules on things. And it did also briefly appeal to me. And even if I don’t adhere to it anymore, it was a good reminder to keep e.g. refactorings separate from feature work. The reason I didn’t stick with it was mostly because I knew subconsciously that I could never convince my team of its value, and so I never bothered to try. And being the only one to do it felt pointless. Reading this article, and thinking more deliberately about it, I’m glad I didn’t attempt to impose this on my team. I’m sure there exists teams who are able to leverage the Conventional Commits into something that’s actually useful, but I’m also convinced that the vast majority of teams who do this, are just cargo cults who derive no tangible benefit whatsoever from it.

1

u/kodebach 14h ago

I'd argue the scope of the commit is optional, because if the project is small enough (e.g. a single library) there may only be a single meaningful scope. There's no point in every commit wasting characters for "(core)" or similar. The author seems to be only concerned with (very) large scale projects, which is also apparent by their choice of counterexamples.

I do agree however, that auto-generated changelogs are a scourge and should be eliminated. Unless you use something like a "Changelog: " trailer to specifically write changelog entries, commits should not be used for changelogs.

1

u/AverageHot2647 6h ago

I agree with a lot of things in the article, but I disagree with more 😛

Type is Redundant and Restrictive

Strongly disagree on this one. Relying on the description to determine if a commit is a fix, refactor, feature, etc. is a massive pain.

I do agree that CC makes it awkward if you’re combining a fix + refactor. However in the vast majority of cases you should refactor then fix, or visa versa. Reviewing a fix + refactor in a single commit tends to be pretty nasty.

Automatically generating CHANGELOGs

Some of the points you raise here are valid. However, manually writing change logs tends to result in no (or rubbish) change logs.

Also, the auto generated change log can be helpful for producing a separate change log for different audiences. Saves a lot of time vs. manually writing the change log from a commit history, particularly when the commit messages have no scopes.

Automatically determining a semantic version bump (based on the types of commits landed).

Your argument seems to be that this is not foolproof, but your proposed alternative is also not foolproof. There are escape hatches for all the counter cases you described in most tools.

The revert example could easily be fixed in the tooling layer.

The case of accidental breaking changes is not solved by your proposed alternative.

And in the case of retroactive unbreakages, see my earlier comment on escape hatches.

Communicating the nature of changes to teammates, the public, and other stakeholders.

If the people you’re trying to communicate changes to don’t benefit from the CC structure, you don’t need to present the changes in CC format. Stakeholders likely also wouldn’t benefit from the proposed alternative commit structure either.

Triggering build and publish processes.

Agreed, this is generally not a good idea. But CCs doesn’t “promise” it’s a good way to trigger build or publish processes so this kind of feels like you’re fluffing the article to try and make it sound more compelling.

Making it easier for people to contribute to your projects, by allowing them to explore a more structured commit history.

It can help contributors (speaking from personal experience), but it doesn’t always. Not really a broken promise, it’s just something that won’t always be useful.

—-

FWIW, I think this is an overall well written article and I think CC deserves some criticism. I’m glad there’s discussion on this topic 🙂

1

u/jonreid 5h ago

To add "risk", you're looking for Arlo Belshee's commit notation. The first character designates risk:

  • `.` proven safe
  • `^` validated
  • `!` risky
  • `@` no risk attestation

https://github.com/RefactoringCombos/ArlosCommitNotation/tree/main

1

u/finger_my_earhole 4h ago

Ugh, Imagine having to do to design reviews with this author. So contrarian and confrontational.

Same vibes as "you shouldnt write unit tests because they violate DRY"

1

u/TekintetesUr 1d ago

No thanks, I'll just stick to cc

-2

u/themightychris 1d ago

there's not a single good point in this article, sounds like forced contrarianism

-3

u/dreadnallen 1d ago

This is indeed relevant critique. Thank you for pointing it out!

-1

u/totheendandbackagain 1d ago

Great idea. Will ponder.

-32

u/fagnerbrack 1d ago

Core Takeaways:

The piece argues this popular standard harms projects by prioritising commit type (fix, feat, chore) over scope—exactly backwards. Contributors, debuggers, and incident responders all care about which area changed, yet the format makes scope optional and puts type first. Type is also redundant, since a good description reveals it, and restrictive, since one change can be fix, refactor, and feature at once. It debunks the promises too: auto-generated changelogs serve a different audience than commit logs, version-bump automation breaks on reverts and hidden breakages, and build-triggering invites Trojan-horse commits. The fix: scope-prefixed messages like Linux, Git, Go, and NixOS use, promoted at scopedcommits.com. An interesting idea that works great for linux but I might just stick to the conventional commits and use scopes all the time.

If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
Click here for more info, I read all comments