Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.41 KB

CONTRIBUTING.md

File metadata and controls

32 lines (23 loc) · 1.41 KB

Contributing

  • Commit messages: please follow this guide
  • You agree that your code is to be licensed as per the repository license, as per the GitHub Terms of Service.
  • Keep commits bite-sized. Try not to do too many things at once in one commit.

tl;dr:

Fortunately, there are well-established conventions as to what makes an idiomatic Git commit message. Indeed, many of them are assumed in the way certain Git commands function. There’s nothing you need to re-invent. Just follow the seven rules below and you’re on your way to committing like a pro.

The seven rules of a great Git commit message - keep in mind: This has all been said before.

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

For example, we want to keep our commit logs looking like this:

$ git log --oneline -5 --author pwebb --before "Sat Aug 30 2014"
5ba3db6 Fix failing CompositePropertySourceTests
84564a0 Rework @PropertySource early parsing logic
e142fd1 Add tests for ImportSelector meta-data
887815f Update docbook dependency and generate epub
ac8326d Polish mockito usage

(Source: this blog post on chris.beams.io)