How to write git commit message
The first line in the commit message is the title or the subject. The subsequent lines are designated as body.
- Include the issue number in the subject / title as
#<issue number>
. This will automatically link the commit to the issue timeline in GitHub. - Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
For more explanation, see this reference: https://chris.beams.io/posts/git-commit/#seven-rules