gitcommitgoogle-style-guide

Git commit convention


Should I remove the articles (a, the) when writing the git commit message?
I found that a lot of commits often 'miss' the articles 'a' and 'the'.
I checked the Google Style Guide but couldn't find the right answer.

Is it just the committers missing the articles or is there some rules for this?

E.g. Which of the below messages should I use?

1) "Resize the resolution of the image and fix the minor error"

2) "Resize resolution of image and fix minor error"


Solution

  • I will actually answer by saying that I prefer the second more concise version. The reason I prefer the concise version is that it makes it easier for me to read your entire comment when viewing it from the Git bash, a tool like SourceTree, or a Git plugin in an IDE like IntelliJ. In most of these tools, the available space to view a series of commits tends to be small, and getting the point across in as few words as possible has value.

    In particular, with the Git bash comments which span more than the available space have to keyed over to view entirely. So shorter comments, with the key information appearing sooner rather than later, might be preferable to someone reviewing your history.