The overall flow of Gitflow is:
This is an adaptation of Thoughtbot’s guide.
The first line of the commit message should be no more than 50 characters. It should answer the question, “Why is this change necessary?”. Treat the first line of the commit message as you would a title, that is, it should start with a capital letter, be grammatically correct, but need not end with a period.
If the change is sufficiently complex, leave a blank line under the first line, and describe the change in more detail. Try to answer the questions, “How does it address the issue?”, and, “What side effects does this change have?”. Consider referencing (through means of a link) an issue from the project management board.
Here’s an example of a good commit:
1
2
3
4
5
6
Make email field optional for OAuth users
https://trello.com/path/to/relevant/card
Due to the variety of OAuth providers and their different permissions, we can't
always guarantee the existence of an email address as part of the response.
Here’s an example of a bad commit:
1
fix stuff
The level of detail in the good example is not always necessary. The important piece is the first line of the commit message, since that’s what people see when reading over commits.