5 ms·
A bad commit (that one of my coworkers always does) is "update file.ext". Says nothing other than the name of the file that was updated, which ends up with ton
by naet 4y ago
A bad commit (that one of my coworkers always does) is "update file.ext". Says nothing other than the name of the file that was updated, which ends up with tons of repeat commit messages for common files and provides zero info that wasn't already included in the commit itself.
Another poor commit is a description like "adds padding". It's a little too vague and doesn't really tell you much that wasn't already apparent by looking at the change itself.
A better commit might be something more like "Add variable padding to ProductLogo component, fixing logo overflows for issue#78". It summarizes the change, the intended outcome of the change, the reason for the change and a reference to an issue all in one short sentence.
You don't have to go into overwhelming detail for every minor front end change but if you're intelligently tracking and squashing your commits writing them well can help a lot later on if you ever need to understand the context of an older commit or even a given line in the codebase.
- dkdbejwi383 4y agoYou forgot my least favourite commit message: “fix PR comments” for a commit that changes 5 unrelated things
- suprfnk 4y agoBut then, putting those 5 unrelated things in the 5 commits that they belong to is a PITA.
- dkdbejwi383 4y agoSure, but I'd prefer 5 new commits that describe the change individually - at least that way I can review each commit individually
- petepete 4y agoThe 'update thing.xyz' one is the default commit message made when editing files using the GitHub web interface. If it's a developer actually typing that in I'd be disappointed.