DEV Community

Discussion on: Git commit message 💬

Collapse
 
jcubic profile image
Jakub T. Jankiewicz

There are rules how to write them correctly by design of git, they are probably invented by Linus Torvalds author of git.
The message should look like this:

short sentence that describe the change

Detail description why the change was needed. You don't need to write
what was changed since that is inside the commit itself. But rationale
is important, so you can benefit why the change happen.
Enter fullscreen mode Exit fullscreen mode

also the first sentence should be shorter (not sure exactly how many characters).

I'm trying to write commit message like this if there are reason why something was changed. This is important specially with big projects and lot of changes where you don't know other part of the code. The message should be the clue.