Skip to content

Instantly share code, notes, and snippets.

@pindell-matt
Last active April 14, 2016 15:33
Show Gist options
  • Save pindell-matt/da987be33fbaa33ab0baec42f3d9c00b to your computer and use it in GitHub Desktop.
Save pindell-matt/da987be33fbaa33ab0baec42f3d9c00b to your computer and use it in GitHub Desktop.
What are some rules of thumb for proper commit messages? Write a gist of rules you can share with your team.
* 1st line should be 50 characters or less, followed by a blank line, start with a capital letter,
and end without a period.
* The 1st line should also be written in the imperative mode, as if you were commanding someone.
Start the line with "Fix", "Add", "Change" instead of "Fixed", "Added", "Changed".
* Avoid `-m / --message` when using `git commit` - as it subtly encourages a shorter,
less-descriptive message, due to the constraints of the terminal.
* Answer the following questions:
* Why is this change necessary
* How does it address the issue
* What are the side effects
* Linke break the commit message at 72 characters to make it readable without having to scroll horizontally
Search some popular open source repositories to find two examples of "good" commit messages.
* https://github.com/servo/servo/pull/10538
* https://github.com/servo/servo/pull/10329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment