0

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"

Jiho Choi
  • 1,083
  • 1
  • 10
  • 26
  • 3
    It dosn't matter. This is more a question of correct English than anything programming related. Try the SE site on the English language. – Ben Thurley Feb 09 '18 at 11:01
  • as long as its clear to someone else what a commit has its ok. the 2nd option would be ok to me edit: that too... more of an english question – L_Church Feb 09 '18 at 11:01
  • 1
    Second version follows the common convention "Git commit header line should be at most 50 characters long". See for example: https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message – Alderath Feb 09 '18 at 14:27
  • 1
    See https://conventionalcommits.org/ – phd Feb 09 '18 at 15:53
  • Tangentially related: https://softwareengineering.stackexchange.com/questions/42110/can-you-recommend-a-good-commit-message-template-guidelines-to-enforce-in-the – Timur Shtatland Feb 17 '22 at 20:37

1 Answers1

4

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.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360