Ravindra BagaleCourses & study guides

Chapter 2: Git Fundamentals

2.9 Commit message hygiene

In short: A commit message is a note to future you and to reviewers.

A commit message is a note to future you and to reviewers.

Good habits

  1. Use the imperative mood: "Add health check", not "Added" or "Adds".
  2. Keep the first line short (about 50–72 characters).
  3. Explain why in the body when the change is non-obvious.
  4. One logical change per commit when you can.
Weak Stronger
update Fix health check path for load balancer
final changes Add .​gitignore for .​env and node_​modules
asdf Document how to run badge API hello locally

Tiny example body:

Add GET /health for badge API hello API

Load balancers need a cheap endpoint that does not hit the database.