What is the default commit message ?
By default, the commit message is empty
Does git allow empty commit message ?
Yes, not by default but given --allow-empty-message
This is an uncommon use case
Why having an empty commit message ?
The TCRDD methodology encourages doing baby steps
When doing so, the commits are so small that almost every time, the only possible message is describing what has been changed which a kind of repetition with the commit’s content
How to avoid empty commit message ?
Give an optional message when gambling
When gambling :
-
add a message with the option
--message(or-m) followed by the messagegit gamble --red --message "This is a great message" -
open the default editor to write a message with the option
--editgit gamble --red --edit
It may be a good idea to add a message when enabling a feature flag
Rearrange commits after
Add the end of iterations, the history can be rewritten using git rebase, commits can even be squashed