Chris Beams has a written an excellent article called How to Write a Git Commit Message on this.
An excerpt from the original article :
The seven rules of a great git commit message
- 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
Following the above will make you a pro, in no time.