3 ms·
I'd assumed people only used -m for commits they're planning on discarding later. A single line is rarely descriptive enough for real work. Brevity is a virtue
by MaxBarraclough 6y ago
I'd assumed people only used -m for commits they're planning on discarding later. A single line is rarely descriptive enough for real work.
Brevity is a virtue. Failing to write a descriptive commit message, is not.
- twic 6y agoIf you make lots of small commits, a single line is enough.
- g-b-r 6y agoI do make lots of awfully small commits, and a single line is rarely enough (but sometimes it indeed is)
- MaxBarraclough 6y agoI generally disagree. Someone already linked to [0]. The background there is quite involved, and it doesn't go away if you break down the commit into many smaller ones. You could argue that sort of write-up belongs on a task-tracker like Jira rather than in a git commit message, but that's a different question. Besides, overly small, overly numerous git commit messages are clunky. They clutter the commit graph without adding value, making it harder to get a clear picture of the work history in the repo. There's a happy middle-ground for the size of a commit: it should correspond to a meaningful unit of work, not the smallest committable unit of work. Of course, using too few very large commits is a problem too. Perhaps, as gspr says, a single-line format may make sense in some instances. If a formalised format is used (as shown in [0]) then of course you'll never have the option. [0] https://github.com/golang/go/commit/5779bb4e92911271583faa1365fd12be2c3894ee https://github.com/golang/go/commit/5779bb4e92911271583faa13...
- gspr 6y agoI'd say a message saying just "typos" is fine for a commit that fixes a bunch of quite obvious typos, for example. Or "added accidentally missing files" for one that adds some files that should have been tracked all along. Or "cosmetic" for one that cleans up some extra newlines or something.
- MaxBarraclough 6y agoYou're right, it might make sense for simple changes, in the absence of a standard format for commit messages.