4 ms·
Here's what, Tim Pope, our favourite vim nerd has to say about this: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html http://tbaggery.com/20
by svckr 10y ago
Here's what, Tim Pope, our favourite vim nerd has to say about this: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html http://tbaggery.com/2008/04/19/a-note-about-git-commit-messa... (Same, but with more words.)
A point of contention seems to be the choice of the imperative, at least for the subject line. While I'm really used to it, both when reading and writing, many people seem to strongly prefer past tense ("Fixed bug …" instead of "Fix bug …").
- Cthulhu_ 10y agoWith that one, the way I see it is that when people use the past tense, the git history becomes a work log, i.e. what the committer did; "I fixed bug...". It shouldn't be like that, the commit should describe what the commit does, i.e. "Fix bug" or "Fixes bug". the latter uses more letters though, which is probably why I see a preference for the "Fix bug" format due to the (soft) 50 character subject constraint.
- gumby 10y agoI am wary of agreeing with someone with your uname but I have to agree! Go with the project's style, but best is if that style is about the code itself. I don't care if this was easy or hard or the bug was non-obvious or if you used a weird trick. I do care what the change does: fixes a race condition, adds a new file mode etc. Those changes matter at the time (what's new in the code?) and when looking backwards (ah, here's where that new file mode was added, let's see what was going on then).
- Tarean 10y agoAlso, when using his amazing git plugin (fugitive) to commit you get very useful highlighting when you break these conventions. http://i.imgur.com/8ix5JGa.png http://i.imgur.com/8ix5JGa.png
- gregmac 10y agoMore importantly, the correct way is the way that is currently being used. If the project uses past tense, use it. If you want to change the convention, that's okay too, but everyone has to change. It's exactly the same issue as coding style. If you can look at code or commit messages and figure out who wrote it based purely on style/formatting, you're doing it wrong (or rather: the person using the inconsistent style/format is).
- greenhatman 10y agoTenses in commit messages seem a bit pedantic and inconsequential. It doesn't really affect much. Unlike tabs vs. spaces, where mixing would cause a mess.
- Analemma_ 10y agoMost code formatting issues are pedantic and inconsequential. Never stopped us from fighting to the death about them ;)