Skip to content

Commit

Permalink
Remove period from "Update draft release notes..." commit message
Browse files Browse the repository at this point in the history
The first line of a commit message should not have a period (`.`)

I am not aware of any official Git documentation for the statement
above. However, it has been a convention in all the projects and
companies I worked on.

The style is also present in the example commit message from the
official Git book. See
https://git-scm.com/docs/MyFirstContribution#:~:text=You%20will%20be%20presented%20with%20your,A%20U%20Thor%20%3Cauthor%40example.com%3E

The style is also used in other sources, such as:

- https://commit.style/
- https://www.gitkraken.com/learn/git/best-practices/git-commit-message#using-imperative-verb-form
- https://thoughtbot.com/blog/5-useful-tips-for-a-better-commit-message

One could argue that the 50 to 72 character length and the period
omission were characters economy constraints from back in the day of
small screens and text-only interfaces. While that is true, I find the
are many benefits in forcing oneself to be concise in the commit
title/summary. As for short line length, it works well for people like
me, who use big font sizes because their eyes strain otherwise.

But aside from all the justifications above, having commit message
titles without a period is the existing convention in this repo, which
make this change a no brainer.
  • Loading branch information
mokagio committed Dec 3, 2024
1 parent 71095be commit 6cc1374
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def self.extract_notes(release_notes_file_path, version)

def self.check_and_commit_extracted_notes_file(file_path, version)
Action.sh("git add #{file_path}")
Action.sh("git diff-index --quiet HEAD || git commit -m \"Update draft release notes for #{version}.\"")
Action.sh("git diff-index --quiet HEAD || git commit -m \"Update draft release notes for #{version}\"")
end

def self.description
Expand Down

0 comments on commit 6cc1374

Please sign in to comment.