DEV Community

Discussion on: Git commit message convention that you can follow!

Collapse
 
morenomdz profile image
MorenoMdz

Why? I get why having a pattern helps to read the structure, but why the convention on adds, vs add vs Add for example? It also limits for those that want to work differently, for example add a feature and style changes in the same commit.

Collapse
 
sebring profile image
J. G. Sebring

Well, one point is to remove the "work differently" part. =)

Same as why having code convention. You can argue that it limit those who prefer new line before the { but that is also exactly the point. You can express personality in your editor by changing font, using dark mode or whatever, but you shouldn't really do it in code or commit messages.

adds vs add

You describe the commit, not "what you have done". Just as documentation of a function is what the function does, if called.

The commit is chang*ing* the behaviour of your program, it resolves a bug or adds a feature. You can consider the list of git log as a list of events (or functions) that build your code base.