Skip to content

Commit

Permalink
Merge pull request #892 from alphagov/882-imperative-mood
Browse files Browse the repository at this point in the history
Make commit messages "imperative"
  • Loading branch information
cjfryer committed May 1, 2024
2 parents 994bfd9 + 00580eb commit 62e0768
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/standards/source-code/working-with-git.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Working with Git
last_reviewed_on: 2023-08-24
last_reviewed_on: 2024-05-01
review_in: 9 months
---

Expand Down 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 62e0768

Please sign in to comment.