Today I Learned

Some of the things I've learned every day since Oct 10, 2016

128: Git Commit Message Subject Conventions

Some conventions that should be followed when writing the subject of a commit message in Git:

  • Separate the subject from the body (if it exists) with a blank line
  • Keep the length at no more than 50 characters
  • Capitalize the first letter, don’t end it with a period
  • Use the imperative mood. For instance, “Update getting started information” instead of “Updated getting started information”, “Refactor X for readability” instead of “Making X more readable”.

Additionally, a commit message subject should convey information about not only what was done but also why.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: