Git commit message

A short hint for writing commit messages

A Git commit should contain a whole idea of completed work.[1] Your completed work idea can be communicated well in a Git commit message by following Chris Beams´[2] suggestion of ending the following sentence:

If applied, this commit will Your commit subject line will come here

Example Git commit messages:

Chris has a checklist to follow along when writing a Git commit message:

  1. Separate the subject from the body with a blank line
  2. Use the imperative mood in the subject line
  3. Limit the subject to 50 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Wrap the body at 72 characters
  7. Use the body to explain what and why, not how

In the context of Git I can recommend David Demaree´s book Git for Humans.[3] It´s eight years ago I´ve read it, but I remember it was of great help for understanding Git.


  1. Dealing with Emergencies in Git, Emma Jane Westby, 24 Ways, 2014 ↩︎

  2. How to Write a Git Commit Message, Chris Beams, 2014 ↩︎

  3. Git for Humans, David Demaree, A Book Apart, 2016 ↩︎

Comments