3 ms·
Question: I use past tense instead of present tense because I explain what changed. But I see a lot of commits written in present tense. Is one better than the
by tqkxzugoaupvwqr 8y ago
Question: I use past tense instead of present tense because I explain what changed. But I see a lot of commits written in present tense. Is one better than the other? Which one?
- detailyang 8y agoditto
- FelipeCortez 8y agoGit itself uses the present tense (Merge/Revert)
- michaelmior 8y agoThis for me is the main reason I prefer to use present tense since it maintains consistency.
- Double_a_92 8y agoPast tense doesn't describe what the commit does, it describes what the developer did.
- rocqua 8y agoThis. The point of an imperative present tense voice is to consider the message from the point of the commit, not from the point of the committer. Commit messages aren't meant to show you did work, they aren't meant to show what work you did either. They are meant to show what changed.
- deleted 8y ago[deleted]
- syn0byte 8y agoYou mean "what changes." Consistency dammit!
- lomnakkus 8y agoPresent tense -- it's (almost?) always a little shorter, so you can fit more information into the "subject" line.
- aequitas 8y agoI tend to use present tense as I'm describing the change that is to be applied to the code by the commit. It often also is terser than past tense by a few chars, sometimes just enough to fit in the commit title (Add vs Added).
- rimliu 8y agoThe sometimes suggested guideline is: make commit message so that it would make sense if added to the phrase "If applied this commit will…".
- pritambaral 8y ago"If applied, this commit will ______". Simple present[0] tense. 0: https://learnenglish.britishcouncil.org/en/english-grammar/present-simple https://learnenglish.britishcouncil.org/en/english-grammar/p...
- laumars 8y agoYou'll get plenty of devs who's make an impassioned argument that present tense reads better (and they'd be right to an extent) but honestly it's really more of an OCD thing than anything. The important thing is that messages are detailed enough to be accurate but terse enough to be eyeballed quickly (if you need more detail then include that after the first line summary); and that you include reference numbers if you're commit is in relation to a ticket (eg JIRA, Github Issues, etc). Some people add tags, emoticons and other stuff. But the real key is consistency. Pick a format and stick with it
- brlewis 8y agoIf the key is consistency, use present tense. If you consistently use past tense, that works until your team merges with another one that's more conventional. The commit message is the headline of your story. Headlines are in present tense even though they describe past events.
- jstimpfle 8y agoIf you want consistency, do the simplest thing possible. Past tense is more complicated then present tense, and does not add value.
- laumars 8y agoHonestly, out of all the things people argue about this has always struck me the strangest. It's the part that makes the least real world difference (vs not including ticket numbers - for example) yet it seems to be the thing people get the most impassioned about. Consistency is important, but if you're expending more energy arguing about it than you would deciphering past tense message then you have serious questions to ask yourself. :P
- deleted 8y ago[deleted]
- karmakaze 8y agoUsing the present tense makes sense as that's the context of the change and it makes it easy to reference what it used to do or what it's set up to do into the future by using other tenses.