DEV Community

Discussion on: Git Strategy for Sanity

Collapse
 
kungtotte profile image
Thomas Landin

Your commit message rules conflict with the tradition of using the imperative tense, and it doesn't seem like your rules would be incompatible with following the tradition.

E.g. by convention your commit messages should work with this format: "If applied, this commit will: your commit message here". So you would write "Add feature XYZ" or "Fix login issue on page ABC" as the initial line of the commit message and it would work with that format.

In your case you could just change the tense of your second-word rule, "add", "remove", "change" etc.

Is there any reason why you went this route? Either version conveys the same information, both are just as grep-able, but only one follows convention.

Collapse
 
evantypanski profile image
Evan Typanski

Also notice that this is the style for merges, eg. Merge pull request #300... so even if you're just staying consistent with the automatically generated messages it's important.

Collapse
 
lmbarr profile image
Luis Miguel • Edited

Exactly, your commit message should be in the imperative mode.

Collapse
 
stargator profile image
Stargator

Thank you, most people on my team write in past-tense :(