Introduction to Git & Github
Writing Commit Messages
One line summary of the change, followed by detailed decription of the changes.
How to Write Better Git Commit Messages – A Step-By-Step Guide – freeCodeCamp is a very good tutorial on this topic.
Quoting some snippets from that article:
Use imperative mood in the subject line. Example – Add fix for dark mode toggle state. Imperative mood gives the tone you are giving an order or request.
To come up with thoughtful commits, consider the following:
- Why have I made these changes?
- What effect have my changes made?
- Why was the change needed?
- What are the changes in reference to?