Skip to content

Good commit vs bad commit

A good commit is one thing, explains why, and has a message that survives git log --oneline; a bad commit mixes concerns and hides intent.

Aspect

Good commit

Bad commit

Scope

One change

Three unrelated changes

Message

Explains why

Explains what (redundant with the diff)

Message length

50 char subject, wrapped body

"fix stuff"

Revertability

Can be reverted alone

Requires a manual surgical revert

Reviewability

200 lines

5,000 lines