Writing git commit message

There are some points that we need to know about writing git commit messages.

  1. Use present tense.
  2. Begins with a verb. Just omit the subject because it is always “I”, the developer.
  3. Use the first line as summary.
  4. For a long message, use the text editor instead of the one line option -m. For a long message, add two line breaks and write the detail after the first summary line.

It’s not required to mention file names in message. The file changes can be viewed in the log. No need to mention the file unless you need to refer to the file in your message.