DEV Community

Nishant Mittal
Nishant Mittal

Posted on

Format of commit messages

What protocol do you follow while writing commit messages?

Also, who else thinks commit messages in lower case look more neat?

Top comments (5)

Collapse
 
kodemaan_42 profile image
Steven Smith

Mostly just add an issue number where applicable and try and write a message which explains what changed in high level language for later "ex
PROJ-23 updated button to be hidden when mobile users view site", no real strict protocol

Collapse
 
waylonwalker profile image
Waylon Walker

I typically use a prefix of FEAT, FIX, DOCS, or CLEAN followed by the lowercase message. I'm not too fancy

Collapse
 
lehmannsystems profile image
Mike

All about an issue number. If there is not an issue tied to it, it shouldn't be committed.

Collapse
 
jingxue profile image
Jing Xue

What Steven said. Technically we are supposed to keep the first line within 80 characters, and put detailed changes in a following paragraph, but nobody reads past the first line these days...

Collapse
 
andsmile profile image
Andrii

but nobody reads past the first line these days...

I think it always has been.
In 90% of cases, you need only high-level description of commit to understand what changes were related to. You need details only if you want to find out why that changes were made, e.g. when you have an issue related to that code.