How to Write the Best Commit Messages

The Best Commit Messages
The best commit messages are like retrospective task list items. When we return to these commit messages, we should be able to recreate the project just by following them like steps on a roadmap. We can also use them as material for something else such as a tutorial, a project timeline, or a project review.
Here's a list of examples
1Add socials to page-footer. 2Add payment system to merch-page. 3[Bug] header text dissappears on hover. 4Fix disappearing text bug. 5Move player code from maint.ts to player.ts. 6Edit about-page copy to explain our mission. 7
Some people describe them as instructions for a computer; instead, they are more akin to a guide for a human.
The best commit messages are also concise but clear and easy to understand.
A bad set of commits would then be:
1# What? Why? How? Where? 2- Add links. 3 4# This step is too big and vague. 5- Add merch. 6 7# What part of it? 8- Update the About page. 9
All the commits fit on the screen without having to scroll. On GitHub, it is recommend to use 75 characters for the title and 72 for the description.
Planning Ahead
Ideally, all the commit messages are planned in advance with a solid list of project tasks, deadlines, milestones, etc.