Here are a few rules to follow in order to craft meaningful git commits.
1. Coherence
Each commit should encapsulate all the code modifications necessary to produce a feature or fix a bug. This means that the code fix for a bug for example, should not be spread over multiple commits.
2. Small
Try to keep all your commits as small as possible. If you try to do too much in a single commit, split it up.
You could say this contradicts 1. but the idea here is to find the right balance. You want to produce commits that encapsulate as small as possible units of business logic.
3. Consistent
Each commit should leave the system in a stable state (no broken build, compilation errors or broken Unit tests).
4. Ordered
Commits should be done in order. When looking at the history, the comments should tell a story. As a result, pay attention to the commits order.
5. Documented
The message should make sense and be detailed enough.
Write it in imperative form (fix bug and not fixes bug or fixed bug).
Provide a link to a user story or bug when possible.