Skip to content

Commit

Permalink
Make commit messages "imperative"
Browse files Browse the repository at this point in the history
It's ambiguous to say that commit messages should be in the present tense.  Both of the following conform to that rule, but the former is preferred:

- "Leverage best-of-breed synergies going forward"
- "Leverages best-of-breed synergies going forward"

We want the "imperative mood" here.  I've added an aide memoire about prepending a silent "please".
  • Loading branch information
cjfryer authored Apr 24, 2024
1 parent 994bfd9 commit d185264
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/standards/source-code/working-with-git.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,17 @@ ticket is publicly viewable (and likely to remain so).
Commit messages should start with a one-line summary no longer than 50
characters. Various Git tools (including GitHub) use this as the commit
summary, so you should format it like an email subject, with a leading capital
and no full stop. The Git convention is to write these in the present tense.
and no full stop. The Git convention is to write these in the imperative mood,
as if you are issuing a command to the repository.

For example:

> Leverage best-of-breed synergies going forward

It can help to imagine a silent "please" at the beginning of your message:

> [Please] Leverage best-of-breed synergies going forward

You should leave a blank line before the rest of the commit message, which you
should wrap at around 72 characters: this makes it easier to view commit
messages in a terminal.
Expand Down

0 comments on commit d185264

Please sign in to comment.